fedoo.constraint.Pressure
- class Pressure(surface_mesh: Mesh, pressure: float | ndarray, initial_pressure: float | ndarray | None = None, nlgeom: bool | None = None, name: str = '')
Pressure load.
Assembly object that define a surface pressure. Can be initialized with the following constructors:
the Pressure constructor describes bellow
Pressure.from_nodes()
to create the Assembly from a volume mesh and a set of nodes defining the surface.Pressure.from_elements()
to create the Assembly from the volume mesh and a set of elements defining the surface.
- Parameters:
surface_mesh (Mesh) – Mesh over which the pressure will be appplied. The mesh is assumed to be a surface mesh (ie 2d mesh for 3d problems or 1d mesh for 2d problems).
pressure (float, array) – If float constant pressure value. If array, could be 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_pressure (float, array, optional) – Initial value of the pressure. Used only to define the initial pressure condition for non linear problems.
nlgeom (bool, str in {'UL', 'TL'}, optional) – 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 used If not defined, the problem.nlgeom attribute is used instead.name (str, optional) – Name of the created assembly.
Example
Apply a uniform pressure around a cube.
import fedoo as fd fd.ModelingSpace('3D') material = fd.constitutivelaw.ElasticIsotrop(200e3, 0.3) mesh = fd.mesh.box_mesh() surface_mesh = fd.mesh.extract_surface(mesh) wf = fd.weakform.StressEquilibrium(material) solid_assembly = fd.Assembly.create(wf, mesh) pressure = fd.constraint.Pressure(surface_mesh, 1000, nlgeom=False) # define a problem from the solid and pressure assemblies pb = fd.problem.Linear(solid_assembly+pressure) pb.solve() pb.get_results(solid_assembly,'Stress').plot('Stress', 'XX')
- __init__(surface_mesh: Mesh, pressure: float | ndarray, initial_pressure: float | ndarray | None = None, nlgeom: bool | None = None, name: str = '')
Methods
Pressure.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
Pressure.compute_elementary_operators
([n_elm_gp])Pressure.convert_data
(data[, convert_from, ...])Pressure.copy
([new_id])Return a raw copy of the assembly without keeping current state (internal variable).
Pressure.create
(weakform[, mesh, elm_type, name])Delete Global Matrix and Global Vector related to the assembly.
Static method of the Assembly class.
Pressure.from_elements
(mesh, element_set, ...)Create a pressure assembly from an element set.
Pressure.from_nodes
(mesh, node_set, pressure)Create a pressure assembly from a node set.
Return a dict with all the known Assembly (with a name).
Pressure.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.
Pressure.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.
Pressure.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
Pressure.get_int_forces
(U[, CoordinateSystem])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.
Pressure.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.
Pressure.get_strain
(U[, Type, nlgeom])Not a static method.
Initialize the associated weak form and assemble the global matrix with the elastic matrix.
Pressure.integrate_field
(field[, type_field])reset the assembly to it's initial state.
Pressure.set_disp
(disp)Start a new time increment.
Pressure.sum
(*listAssembly[, name])Return a new assembly which is a sum of N assembly.
reset the current time increment (internal variable in the constitutive equation) Doesn't assemble the new global matrix.
Pressure.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.