Postprocess
Module for computing post-processing quantities in finite element simulations of elastic problems.
This module provides functions to compute various post-processing quantities in finite element simulations, including reaction forces, displacements at specific points, elastic energy, and external work.
Functions:
| Name | Description |
|---|---|
compute_measured_forces |
Computes the reaction forces on a specified boundary. |
compute_measured_displacement |
Computes the displacement at a specified point. |
compute_elastic_energy |
Computes the elastic energy in the domain. |
compute_external_work |
Computes the external work done on the domain. |
compute_elastic_energy(domain, model, uh)
Compute the elastic energy in the domain.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
domain
|
Domain
|
The domain of the problem. |
required |
model
|
ElasticModel
|
The elastic model being used. |
required |
uh
|
Function
|
The displacement solution of the elastic problem. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Elastic energy. |
Source code in src/gcrack/postprocess.py
compute_external_work(domain, model, uh)
Compute the external work.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
domain
|
Domain
|
The domain of the problem. |
required |
model
|
ElasticModel
|
The elastic model being used. |
required |
uh
|
Function
|
The displacement solution of the elastic problem. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
External work. |
Source code in src/gcrack/postprocess.py
compute_measured_displacement(domain, uh, gcrack_data)
Compute the displacement at the specified point.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
domain
|
Domain
|
The domain of the problem. |
required |
uh
|
Function
|
The displacement solution of the elastic problem. |
required |
Returns:
| Type | Description |
|---|---|
array
|
np.array: The computed displacement as a numpy array. |
Source code in src/gcrack/postprocess.py
compute_measured_forces(domain, model, uh, gcrack_data)
Compute the measured forces.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
domain
|
Domain
|
The domain of the problem. |
required |
model
|
ElasticModel
|
The elastic model being used. |
required |
uh
|
Function
|
The displacement solution of the elastic problem. |
required |
Returns:
| Type | Description |
|---|---|
array
|
np.array: The computed reaction forces as a numpy array. |