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
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | |
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
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | |
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
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | |
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. |
Source code in src/gcrack/postprocess.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |