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 = '', time_func=None)
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.NonLinearStaticorfedoo.problem.NonLinearNewmarkIf 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.
time_func (callable, optional) – Function that gives the temporal evolution of the distributed load when the assembly is converted to a Neumann boundary condition. By default, a linear evolution is considered.
Notes
DistributedForce is an assembly and can still be combined directly with another assembly, for instance
fd.problem.Linear(solid_assembly + volume_force). It can also be used as an external Neumann boundary condition withpb.bc.add(volume_force)orpb.bc.add(volume_force.as_neumann()). This form is useful for nonlinear problems because the equivalent nodal force is included in the external load vector and in residual normalization. When geometrical nonlinearities are active, the load is updated during Newton iterations.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 volume-force assemblies pb = fd.problem.Linear(solid_assembly+volume_force) pb.bc.add('Dirichlet', 'bottom', 'Disp', 0) pb.solve() # or add the same force as an external Neumann BC pb = fd.problem.NonLinear(solid_assembly, nlgeom=True) pb.bc.add(volume_force) 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 = '', time_func=None)
Methods
DistributedForce.as_neumann([name, time_func])Return this distributed load as a Neumann boundary condition.
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[, ...])Iterate over the leaf assemblies contained in this object.
DistributedForce.operator_apply(wf, nodal_vector)Apply a discrete nodal vector to the trial space of a bilinear operator.
Register global DOFs required by the assembly on a problem.
reset the assembly to it's initial state.
DistributedForce.set_start(pb[, t_fact])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 beginning 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.