Models

This module contains premade jax-transformable partial differential equation (PDE) formulations, weak forms, user-defined elements, and time integration procedures.

The models-functions return callables with appropriate arguments for the use required in the other modules of AutoPDEx. These functions can then be passed e.g. to the solver via static_settings[‘model’].

For instance, a typical weak form function has the following arguments:
  • x (jnp.ndarray): Spatial coordinates at the integration point.

  • ansatz (function): Ansatz function representing the field variable (e.g., displacement or temperature).

  • test_ansatz (function): Test ansatz function representing the virtual displacement or virtual temperature.

  • settings (dict): Settings for the computation.

  • static_settings (dict): Static settings for the computation.

  • int_point_number (int): Integration point number.

  • set: Number of domain.

Note: Some of the models work for degrees of freedoms (dofs) as a jnp.ndarray and some work for dicts of jnp.ndarrays. It is specified in each docstring.

User potentials/elements

mixed_reference_domain_potential(...)

Constructs a multi-field 'user potential' for integration of a potential in the reference configuration of finite elements.

mixed_reference_domain_residual(...)

Constructs a multi-field 'user residual' for integration of a weak form in the reference configuration of finite elements.

mixed_reference_surface_potential(...)

Constructs a multi-field 'user potential' for integration of a potential in the reference configuration of surface elements.

mixed_reference_surface_residual(...)

Constructs a multi-field 'user residual' for integration of a weak form in the reference configuration of surface elements.

isoparametric_domain_integrate_potential(...)

Constructs a local integrand fun (user potential) for integration of functions in the reference configuration of isoparametric elements.

isoparametric_domain_element_galerkin(...[, ...])

Constructs an isoparametric domain element for Galerkin methods using a given weak form function and DOFs as jnp.ndarray.

isoparametric_surface_element_galerkin(...)

Constructs an isoparametric surface element for Galerkin methods using a given weak form function and DOFs as jnp.ndarray.

Functions for coupling with DAE solver

mixed_reference_domain_residual_time(...)

Constructs a multi-field 'user residual' for time-dependent weak forms.

mixed_reference_domain_int_var_updates(...)

Similar as mixed_reference_domain_residual_time, but generates a function that doesn't compute the residual, but the internal variables based on the local_int_var_updates_fun.

Convenience functions for modelling

aug_lag_potential(lag, constr, eps)

Augmented Lagrangian potential function for an inequality constraint (constr >= 0).

kelvin_mandel_extract(a)

Converts a 6-component Kelvin-Mandel representation vector into a 3x3 symmetric matrix.

Linear equations

transport_equation(c)

Transport equation: du/dt + c * du/dx = 0

poisson([coefficient_fun, source_fun])

Poisson equation in n dimensions: coefficient * Laplace(Theta) + source_term = 0

poisson_weak([coefficient_fun, source_fun])

Poisson equation in n dimensions as weak form.

poisson_fos(spacing[, coefficient_fun, ...])

Poisson equation as set of first order models augmented by curl(v)=0

heat_equation(diffusivity_fun)

Space-time heat equation with thermal diffusivity alpha.

heat_equation_fos(diffusivity_fun)

Space-time heat equation with thermal diffusivity alpha as a first order system with curl-augmentation for more than 2 spatial dimensions

d_alembert(wave_number_fun)

Space-time d'Alembert operator 1 temporal [-1] and (n-1) spatial [:n-1] dimension with wave number c.

d_alembert_fos(wave_number_fun, spacing)

Constructs a first-order system for the space-time d'Alembert operator with wave speed c.

linear_elasticity(youngs_mod_fun, ...[, ...])

Constructs the strong form of linear elasticity in Voigt notation, displacement based.

linear_elasticity_weak(youngs_mod_fun, ...)

Constructs the weak form of linear elasticity in Voigt notation, displacement based.

linear_elasticity_fos(youngs_mod_fun, ...[, ...])

Constructs the first order system (FOS) of linear elasticity in Voigt notation, displacement based.

neumann_weak(neumann_fun)

Constructs the weak form of Neumann boundary conditions for the virtual work of surface tractions or heat inflow.

Nonlinear equations

burgers_equation_inviscid()

Constructs the inviscid Burgers' equation: du/dt + u * du/dx = 0.

hyperelastic_steady_state_fos(...[, ...])

Constructs a first-order PDE system for given strain energy function

hyperelastic_steady_state_weak(...[, ...])

Constructs the weak form of hyperelasticity for given strain energy function

navier_stokes_incompressible_steady(...[, ...])

Constructs the steady-state incompressible Navier-Stokes equations.

navier_stokes_incompressible(dynamic_viscosity)

Constructs the transient incompressible Navier-Stokes equations.

Strain energy functions

neo_hooke(F, param)

Computes the strain energy for a neo-Hookean material model of Ciarlet type given the deformation gradient.

isochoric_neo_hooke(F, mu)

Computes the strain energy for an isochoric neo-Hookean material model.

linear_elastic_strain_energy(F, param)

Computes the strain energy for a linear elastic material for small deformations.