fenicsxconcrete.experimental_setup package
Submodules
fenicsxconcrete.experimental_setup.am_multiple_layers module
- class AmMultipleLayers(parameters: dict[str, Quantity])[source]
Bases:
Experimentsets up a simple layered structure
all layers of the same height are on top of each other, the boundary on the bottom is fixed the mesh includes all (activation via pseudo-density)
- parameters
parameter dictionary with units
- p
parameter dictionary without units
- create_body_force(v: Argument) Form[source]
defines body force for am experiments without element activation
element activation via pseudo density and incremental loading via parameter [“load_time”] computed in class concrete_am
- Parameters:
v – test function
- Returns:
form for body force
- create_body_force_am(v: Argument, q_fd: Function, rule: QuadratureRule) Form[source]
defines body force for am experiments
element activation via pseudo density and incremental loading via parameter [“load_time”] computed in class concrete_am
- Parameters:
v – test function
q_fd – quadrature function given the loading increment where elements are active
rule – rule for the quadrature function
- Returns:
form for body force
- create_displacement_boundary(V: FunctionSpace) list[DirichletBC][source]
defines displacement boundary as fixed at bottom
- Parameters:
V – function space
- Returns:
list of dirichlet boundary conditions
fenicsxconcrete.experimental_setup.base_experiment module
- class Experiment(parameters: dict[str, Quantity])[source]
Bases:
ABC,LogMixinbase class for experimental setups
- parameters
parameter dictionary with units
- p
parameter dictionary without units
- boundary_back() Callable[source]
specifies boundary: plane at front
only for 3D case front plane
- Returns:
fct defining if dof is at boundary
- boundary_bottom() Callable[source]
specifies boundary: plane at bottom
Returns: fct defining if dof is at boundary
- boundary_front() Callable[source]
specifies boundary: plane at front
only for 3D case front plane
- Returns:
fct defining if dof is at boundary
- boundary_left() Callable[source]
specifies boundary: plane at left side
- Returns:
fct defining if dof is at boundary
- boundary_right() Callable[source]
specifies boundary: plane at left side
- Returns:
fct defining if dof is at boundary
- boundary_top() Callable[source]
specifies boundary: plane at top
- Returns:
fct defining if dof is at boundary
- create_body_force(v: Argument | None = None) Form | None[source]
defines empty body force function
- Parameters:
v – test function
- Returns:
if defined a form for the body force otherwise None
- create_body_force_am(v: Argument | None = None, q_fd: Function | None = None, rule: QuadratureRule | None = None) Form | None[source]
defines empty body force function for am case
- Parameters:
v – test function
q_fd – quadrature function given the loading increment where elements are active
rule – rule for the quadrature function
- Returns:
if defined a form for the body force otherwise None
- abstractmethod create_displacement_boundary(V: FunctionSpace) list[DirichletBC] | None[source]
defines empty displacement boundary conditions (to be done in child)
this function is abstract until there is a need for a material that does not need a displacement boundary once that is required, just make this a normal function that returns an empty list
- Parameters:
V – function space
- Returns:
if defined a list with displacement boundary conditions otherwise None
- create_force_boundary(v: Argument | None = None) Form | None[source]
defines empty force boundary (to be done in child)
- Parameters:
v – test function
- Returns:
if defined a form for the force otherwise None
fenicsxconcrete.experimental_setup.cantilever_beam module
- class CantileverBeam(parameters: dict[str, Quantity] | None = None)[source]
Bases:
ExperimentSets up a cantilever beam, clamped on one side and loaded with gravity
- parameters
parameter dictionary with units
- p
parameter dictionary without units
- create_body_force(v: Argument) Form[source]
defines body force
- Parameters:
v – test function
- Returns:
form for body force
- create_displacement_boundary(V) list[source]
defines displacement boundary as fixed at bottom
- Parameters:
V – function space
- Returns:
list of dirichlet boundary conditions
fenicsxconcrete.experimental_setup.compression_cylinder module
- class CompressionCylinder(parameters: dict[str, Quantity] | None = None)[source]
Bases:
ExperimentA cylinder mesh for a uni-axial displacement load
- parameters
parameter dictionary with units
- p
parameter dictionary without units
- apply_displ_load(top_displacement: Quantity | float) None[source]
Updates the applied displacement load
- Parameters:
top_displacement – Displacement of the top boundary in mm, > 0 ; tension, < 0 ; compression
- create_displacement_boundary(V: FunctionSpace) list[DirichletBC][source]
Defines the displacement boundary conditions
- Parameters:
V – Function space of the structure
- Returns:
list of DirichletBC objects, defining the boundary conditions
- generate_cylinder_mesh(radius: float, height: float, mesh_density: float, element_degree: int = 2) Mesh[source]
Uses gmsh to generate a cylinder mesh for fenics
- Parameters:
radius – radius of the cylinder
height – height of the cylinder
mesh_density – defines the size of the elements and the minimum number of element edges in the height of the cylinder
element_degree – degree of the discretization elements, quadratic geometry by default
- Returns:
cylinder mesh for dolfin
fenicsxconcrete.experimental_setup.simple_beam module
- class SimpleBeam(parameters: dict[str, Quantity])[source]
Bases:
ExperimentSets up a simply supported beam, fix on the left
- parameters
parameter dictionary with units
- p
parameter dictionary without units
- create_body_force(v: Argument) Form[source]
defines body force
- Parameters:
v – test function
- Returns:
form for body force
- create_displacement_boundary(V) list[source]
defines displacement boundary as fixed at bottom
- Parameters:
V – function space
- Returns:
list of dirichlet boundary conditions
- create_force_boundary(v: Argument) Form[source]
distributed load on top of beam
- Parameters:
v – test function
- Returns:
form for force boundary
fenicsxconcrete.experimental_setup.simple_cube module
- class SimpleCube(parameters: dict[str, Quantity] | None = None)[source]
Bases:
Experimentsets up an uniaxial cube structure with displacement load
2D unit square or 3D unit cube with uniaxial boundary conditions displacement controlled for material model testing
- parameters
parameter dictionary with units
- p
parameter dictionary without units
- apply_displ_load(top_displacement: Quantity | float) None[source]
Updates the applied displacement load
- Parameters:
top_displacement – Displacement of the top boundary in mm, > 0 ; tension, < 0 ; compression
- apply_temp_bc(T_bc: Quantity | float) None[source]
Updates the applied temperature boundary condition
- Parameters:
T_bc1 – Temperature of the top boundary in degree Celsius
- create_body_force(v: Argument) Form | None[source]
Defines the body force in either z or y direction depending on mesh dimension
- Parameters:
v – test function
- Returns:
if use_body_force flag is true the form for the body force, else None
- create_displacement_boundary(V: FunctionSpace) list[DirichletBC][source]
Defines the displacement boundary conditions
- Parameters:
V – Function space of the structure
- Returns:
list of DirichletBC objects, defining the boundary conditions
- create_temperature_bcs(V: FunctionSpace) list[DirichletBC][source]
defines empty temperature boundary conditions (to be done in child)
this function is abstract until there is a need for a material that does need a temperature boundary once that is required, just make this a normal function that returns an empty list
- Parameters:
V – function space
- Returns:
a list with temperature boundary conditions
fenicsxconcrete.experimental_setup.tensile_beam module
- class TensileBeam(parameters: dict[str, Quantity] | None = None)[source]
Bases:
ExperimentSets up a tensile beam experiment, clamped on one side and loaded with force on the other side
- parameters
parameter dictionary with units
- p
parameter dictionary without units
- create_displacement_boundary(V) list[source]
Defines the displacement boundary conditions
- Parameters:
V – Function space of the structure
- Returns:
list of DirichletBC objects, defining the boundary conditions
- create_force_boundary(v: Argument) Form[source]
distributed load on top of beam
- Parameters:
v – test function
- Returns:
form for force boundary