fedoo.constraint.DistributedForce
- class DistributedForce(mesh: Mesh, force: list | np.typing.ArrayLike[float], initial_force: np.typing.ArrayLike[float] | None = None, nlgeom: bool | None = None, name: str = '')
Distributed force (e.g gravity load).
Assembly object that define a distributed force with fixed orientation. The physical nature of the force depend on the geometry dimension.
2d problem with 1d mesh: line load for beams or surface force/stress for 2d plane element
2d problem with 2d mesh: volume force
3d problem with 1d mesh: line load
3d problem with 2d mesh: surface force or stress
3d porblem with 3d mesh: volume force
- Parameters:
mesh (Mesh) – Mesh over which the force will be appplied.
force (list or array with len(force)==3) – force[i] is the force along the ith dimension. if force[i] is an array, it is interpreted as gauss point, element or node values depending on the array dimension. In case the value type is confusing, gauss points will be choosen.
initial_force (list or array with len(force)==3) – Initial value of the force. Used only to define the initial force condition for non linear problems.
nlgeom (bool, str in {'UL', 'TL'}) – If True, the geometrical non linearities are activate when used in the context of NonLinearProblems (default updated lagrangian method) such as
fedoo.problem.NonLinearStatic
orfedoo.problem.NonLinearNewmark
If nlgeom == ‘UL’ the updated lagrangian method is used (same as True) If nlgeom == ‘TL’ the total lagrangian method is usedname (str, optional) – Name of the created assembly.
Example
Apply a volume force on a cube.
import fedoo as fd fd.ModelingSpace('3D') material = fd.constitutivelaw.ElasticIsotrop(200e3, 0.3) mesh = fd.mesh.box_mesh() wf = fd.weakform.StressEquilibrium(material) solid_assembly = fd.Assembly.create(wf, mesh) volume_force = fd.constraint.DistributedForce( mesh, [0,0,-1000], nlgeom=False) # define a problem from the solid and pressure assemblies pb = fd.problem.Linear(solid_assembly+volume_force) pb.bc.add('Dirichlet', 'bottom', 'Disp', 0) pb.solve() pb.get_results(solid_assembly,'Stress').plot('Stress', 'XX', 'Node')
- __init__(mesh: Mesh, force: list | np.typing.ArrayLike[float], initial_force: np.typing.ArrayLike[float] | None = None, nlgeom: bool | None = None, name: str = '')
Methods
DistributedForce.assemble_global_mat
([compute])Compute the global matrix and global vector related to the assembly if compute = 'all', compute the global matrix and vector if compute = 'matrix', compute only the matrix if compute = 'vector', compute only the vector if compute = 'none', compute nothing
DistributedForce.convert_data
(data[, ...])DistributedForce.copy
([new_id])Return a raw copy of the assembly without keeping current state (internal variable).
DistributedForce.create
(weakform[, mesh, ...])Delete Global Matrix and Global Vector related to the assembly.
Static method of the Assembly class.
Return a dict with all the known Assembly (with a name).
DistributedForce.get_element_results
(operator, U)Return some element results based on the finite element discretization of a differential operator on a mesh being given the dof results and the type of elements.
Get the last computed global matrix.
Get the last computed global vector.
DistributedForce.get_gp_results
(operator, U)Return some results at element Gauss points based on the finite element discretization of a differential operator on a mesh being given the dof results and the type of elements.
DistributedForce.get_grad_disp
(U[, Type])Return the Gradient Tensor of a vector (generally displacement given by Problem.get_DofSolution('all') as a list of list of numpy array The total displacement field U has to be given as a flatten numpy array see get_node_results and get_element_resultss
DistributedForce.get_int_forces
(U[, ...])Only available for 2 nodes beam element Return the element internal Forces and moments related to a specific assembly considering the DOF solution given in U.
DistributedForce.get_node_results
(operator, U)Return some node results based on the finite element discretization of a differential operator on a mesh being given the dof results and the type of elements.
DistributedForce.get_strain
(U[, Type, nlgeom])Not a static method.
Initialize the associated weak form and assemble the global matrix with the elastic matrix.
DistributedForce.integrate_field
(field[, ...])reset the assembly to it's initial state.
Start a new time increment.
DistributedForce.sum
(*listAssembly[, name])Return a new assembly which is a sum of N assembly.
Reset the assembly to the begining of the time iteration.
DistributedForce.update
(pb[, compute])Update the associated weak form and assemble the global matrix :param - pb: a Problem object containing the Dof values
returns: The total number of integration points (ie Gauss points) associated to the assembly.
Name of the assembly if defined.
Modeling space associated to the assembly.
Alias for the sv dict containing the state variables.
Dictionary of state variables associated to the current problem.
Assembly associated to the mesh of the deformed geometry.
AssemblySum object that contains the assembly.