Model Parameters

The model parameters define the mathematical setting and the problem’s discretization.

pydantic model nopec.parameters.ModelParameters

Model parameters.

These parameters include mathematical parameters such as the space domain \(\Omega\), the diffusion coefficients \(\kappa_1\) and \(\kappa_2\), the initial data \(y_\circ\), and the final time \(T\).

Furthermore,

Config:
  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

field FE_degree: Literal[1, 2] = 1

Degree of finite elements. Allowed values: 1, 2.

field K: int = 201

Number of time steps.

field N_nodes_x: int = 200

Number of discretization nodes in space.

field T: float = 2.0

Final time.

field damped_Newton: bool = True

Whether to use damped Newton.

field discretization_model: Literal['fenics', 'sparse_fenics', 'boundary', 'my_L1', 'my_L2'] = 'sparse_fenics'

discretization method: one of “fenics”, “sparse_fenics”, “boundary”, “my_L1”, “my_L2”.

field kappa_1: Callable[[ndarray], ndarray] = <function ModelParameters.<lambda>>

Diffusion coefficient for \(y\) passed as a callable function on the variable \(x\) evaluated on the first component (x) punctually, i.e. from the array x[0] to a numpy array. The default value is the constant 1, i.e. \(\kappa_1(x)≡1\).

field kappa_2: Callable[[ndarray], ndarray] = <function ModelParameters.<lambda>>

Diffusion coefficient for \(q\) passed as a callable function on the variable \(x\) evaluated on the first component (x) punctually, i.e. from the array x[0] to a numpy array. The default value is the constant 1, i.e. \(\kappa_1(x)≡1\).

field nonlinear_conv_tol: float = 1e-07

Nonlinear problem tolerance.

field time_disc_met: Literal['IE', 'CN'] = 'IE'

Time discretization method. “IE” Implicit Euler, “CN” Crank Nicolson.

field x_0: float = 0.0

Left point of \(\Omega\). The default space domain is \((0,1)\).

field x_L: float = 1.0

Right points of \(\Omega\). The default space domain is \((0,1)\).

field y_0: Callable[[ndarray], ndarray] = <function ModelParameters.<lambda>>

Initial value for \(y\) passed as a callable function on the variable \(x\) evaluated on the first component (x) punctually, i.e. from the array x[0] to a numpy array. The default value is the constant 5, i.e. \(y_\circ(x)≡5\).