fea_disc module¶
Finite element analysis (FEA) for 2D topology optimization problems.
- class gemseo.problems.topo_opt.fea_disc.FininiteElementAnalysis(nu=0.3, n_x=100, n_y=100, f_node=10200, f_direction=1, f_amplitude=-1, fixed_nodes=None, fixed_dir=None, name=None)[source]
Bases:
MDODiscipline
Finite Element Analysis for 2D topology optimization problems.
Take in input the Young Modulus vector E and computes in output the compliance, i.e. twice the work of external forces.
Initialize self. See help(type(self)) for accurate signature.
- Parameters:
nu (float) –
The material Poisson’s ratio.
By default it is set to 0.3.
n_x (int) –
The number of elements in the x-direction.
By default it is set to 100.
n_y (int) –
The number of elements in the y-direction.
By default it is set to 100.
f_node (int | Sequence[int]) –
The indices of the nodes where the forces are applied.
By default it is set to 10200.
f_direction (int | Sequence[int]) –
The force direction for each
f_node
, either 0 for x or 1 for y.By default it is set to 1.
f_amplitude (int | Sequence[int]) –
The force amplitude for each pair
(f_node, f_direction)
.By default it is set to -1.
fixed_nodes (int | Sequence[int] | None) – The indices of the nodes where the structure is clamped. If
None
, a default value is used.fixed_dir (int | Sequence[int] | None) – The clamped direction for each node, encode 0 for x and 1 for y. If
None
, a default value is used.name (str | None) – The name of the discipline. If
None
, use the class name.
- compute_elementary_stiffeness_matrix()[source]
Compute the elementary stiffness matrix of 1x1 quadrilateral elements.
- Return type:
None
- prepare_fea()[source]
Prepare the Finite Element Analysis.
- Return type:
None
- cache: AbstractCache | None
The cache containing one or several executions of the discipline according to the cache policy.
- data_processor: DataProcessor
A tool to pre- and post-process discipline data.
- exec_for_lin: bool
Whether the last execution was due to a linearization.
- input_grammar: BaseGrammar
The input grammar.
- jac: dict[str, dict[str, ndarray]]
The Jacobians of the outputs wrt inputs.
The structure is
{output: {input: matrix}}
.
- name: str
The name of the discipline.
- output_grammar: BaseGrammar
The output grammar.
- re_exec_policy: ReExecutionPolicy
The policy to re-execute the same discipline.
- residual_variables: Mapping[str, str]
The output variables mapping to their inputs, to be considered as residuals; they shall be equal to zero.
- run_solves_residuals: bool
Whether the run method shall solve the residuals.