fenicsxconcrete.finite_element_problem package

Submodules

fenicsxconcrete.finite_element_problem.base_material module

class MaterialProblem(experiment: Experiment, parameters: dict[str, Quantity], pv_name: str = 'pv_output_full', pv_path: PosixPath | None = None)[source]

Bases: ABC, LogMixin

class SensorDict[source]

Bases: dict

Dict that also allows to access the parameter p[“parameter”] via the matching attribute p.parameter to make access shorter

When to sensors with the same name are defined, the next one gets a number added to the name

add_sensor(sensor: BaseSensor) None[source]
clean_sensor_data() None[source]
abstractmethod compute_residuals() None[source]

Implemented in child if needed

abstractmethod static default_parameters() tuple[Experiment, dict[str, Quantity]][source]

returns a dictionary with required parameters and a set of working values as example

delete_sensor() None[source]
export_sensors_metadata(path: Path) None[source]

Exports sensor metadata to JSON file according to the appropriate schema.

Parameters:

path – Path Path where the metadata should be stored

import_sensors_from_metadata(path: Path) None[source]

Import sensor metadata to JSON file and validate with the appropriate schema.

Parameters:

path – Path Path where the metadata file is

abstractmethod setup() None[source]

Implemented in child if needed

abstractmethod solve() None[source]

Implemented in child if needed

update_time() None[source]

update time

class QuadratureFields(measure: Measure | None = None, plot_space_type: tuple[str, int] = ('DG', 0), mandel_stress: Expr | Function | None = None, mandel_strain: Expr | Function | None = None, stress: Expr | Function | None = None, strain: Expr | Function | None = None, degree_of_hydration: Expr | Function | None = None, damage: Expr | Function | None = None, compressive_strength: Expr | Function | None = None, tensile_strength: Expr | Function | None = None, youngs_modulus: Expr | Function | None = None, yield_values: Expr | Function | None = None, history_scalar: Expr | Function | None = None)[source]

Bases: object

A dataclass to hold the quadrature fields (or ufl expressions) of the problem, at least those that we want to plot in paraview. Additionally, the measure for the integration and the type of function space is stored. The list of names should be extendend when needed.

Examples

Since this is a dataclass, the __init__ method is automatically generated and can be used to selectively set fields. All fields that are not explicitely set are set to their default value (here None).

>>> q_fields = QuadratureFields(measure=rule.dx, plot_space_type=("Lagrange", 4), stress=some_function)
compressive_strength: Expr | Function | None = None
damage: Expr | Function | None = None
degree_of_hydration: Expr | Function | None = None
history_scalar: Expr | Function | None = None
mandel_strain: Expr | Function | None = None
mandel_stress: Expr | Function | None = None
measure: Measure | None = None
plot_space_type: tuple[str, int] = ('DG', 0)
strain: Expr | Function | None = None
stress: Expr | Function | None = None
tensile_strength: Expr | Function | None = None
yield_values: Expr | Function | None = None
youngs_modulus: Expr | Function | None = None
class SolutionFields(displacement: Function | None = None, velocity: Function | None = None, temperature: Function | None = None, nonlocal_strain: Function | None = None)[source]

Bases: object

A dataclass to hold the solution fields of the problem. The list of names should be extendend when needed.

Examples

Since this is a dataclass, the __init__ method is automatically generated and can be used to selectively set fields. All fields that are not explicitely set are set to their default value (here None).

>>> fields = SolutionFields(displacement=some_function, temperature=some_other_function)
displacement: Function | None = None
nonlocal_strain: Function | None = None
temperature: Function | None = None
velocity: Function | None = None

fenicsxconcrete.finite_element_problem.concrete_am module

fenicsxconcrete.finite_element_problem.concrete_thermo_mechanical module

fenicsxconcrete.finite_element_problem.linear_elasticity module

class LinearElasticity(experiment: Experiment, parameters: dict[str, Quantity], pv_name: str = 'pv_output_full', pv_path: str = None)[source]

Bases: MaterialProblem

Material definition for linear elasticity

compute_residuals() None[source]

Implemented in child if needed

static default_parameters() tuple[Experiment, dict[str, Quantity]][source]

returns a dictionary with required parameters and a set of working values as example

epsilon(u: Argument) Sym[source]
static parameter_description() dict[str, str][source]

static method returning a description dictionary for required parameters

Returns:

description dictionary

pv_plot() None[source]
setup() None[source]

Implemented in child if needed

sigma(u: Argument) Expr[source]
solve() None[source]

Implemented in child if needed

Module contents