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 or fedoo.problem.NonLinearNewmark If nlgeom == ‘UL’ the updated lagrangian method is used (same as True) If nlgeom == ‘TL’ the total lagrangian method is used

  • name (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.compute_elementary_operators([...])

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, ...])

DistributedForce.delete_global_mat()

Delete Global Matrix and Global Vector related to the assembly.

DistributedForce.delete_memory()

Static method of the Assembly class.

DistributedForce.get_all()

Return a dict with all the known Assembly (with a name).

DistributedForce.get_change_of_basis_mat()

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.

DistributedForce.get_global_matrix()

Get the last computed global matrix.

DistributedForce.get_global_vector()

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.

DistributedForce.initialize(pb)

Initialize the associated weak form and assemble the global matrix with the elastic matrix.

DistributedForce.integrate_field(field[, ...])

DistributedForce.reset()

reset the assembly to it's initial state.

DistributedForce.set_disp(disp)

DistributedForce.set_start(pb)

Start a new time increment.

DistributedForce.sum(*listAssembly[, name])

Return a new assembly which is a sum of N assembly.

DistributedForce.to_start(pb)

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

DistributedForce.n_gauss_points

returns: The total number of integration points (ie Gauss points) associated to the assembly.

DistributedForce.name

Name of the assembly if defined.

DistributedForce.space

Modeling space associated to the assembly.

DistributedForce.state_variables

Alias for the sv dict containing the state variables.

DistributedForce.sv

Dictionary of state variables associated to the current problem.

DistributedForce.current

Assembly associated to the mesh of the deformed geometry.

DistributedForce.associated_assembly_sum

AssemblySum object that contains the assembly.