cideMOD.models.model_options

Functions

get_model_options([model])

Factory method that returns the model options object of the selected model

Classes

BaseModelOptions(*[, model, dimensionless, ...])

Settings for the cideMOD's cell model simulation.

class cideMOD.models.model_options.BaseModelOptions(*, model: str = 'P2D', dimensionless: bool = False, solve_LAM: bool = False, N_x: int | list = 30, N_y: int = 10, N_z: int = 10, FEM_order: int = 1, raise_errors_on_exit: bool = True, clean_on_exit: bool = True, save_on_exit: bool = True, globals_txts: bool = True, comm: object = None, overwrite: bool = False, save_path: str | None = None, mode: str = 'ERROR', verbose: int = VerbosityLevel.BASIC_PROBLEM_INFO)[source]

Bases: BaseModel

Settings for the cideMOD’s cell model simulation.

General Parameters

model: str

Simulation mode, default “P2D”

dimensionless: bool

Whether to use the dimensionless version or not. Default to False

solve_LAM: bool

Whether to solve LAM problem or not. Default to False

N_x: int

Discretization in x direction. Default to 30

N_y: int

Discretization in y direction. Default to 10

N_z: int

Discretization in z direction. Default to 10

FEM_order: int

Order of interpolating finite elements. Default to 1

time_scheme: str

Time discretization scheme, default “euler_implicit”

raise_errors_on_exit: bool

Whether to raise the SolverCrashed error on exit if it happens. Default to True.

clean_on_exit: bool

Whether to clean from memory saved data at the end of the solve cycle. Default to True.

save_on_exit: bool

Whether to save global variables on exit. They will be saved always before cleaning. Default to True.

globals_txts: bool

Whether to save global variables on individual .txt files or just as a single ‘condensated.txt’ file. Default to True.

commMPI.Intracomm, optional

MPI Communicator for running tests in parallel. Default to MPI.COMM_WORLD.

overwrite: bool, optional

Whether or not to override existing data (if so). Default to False.

save_path: str, optional

Path to the folder outputs. If it does not exist, create it. Otherwise it will check overwrite to override the existing data or change the given save_path

verbose: int

Verbosity level. Defaults to VerbosityLevel.BASIC_PROBLEM_INFO. For more information type help(cideMOD.VerbosityLevel)

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

class Config[source]

Bases: object

allow_mutation = True
arbitrary_types_allowed = True
extra = 'forbid'
FEM_order: int
N_x: int | list
N_y: int
N_z: int
clean_on_exit: bool
comm: object
dimensionless: bool
globals_txts: bool
mode: str
model: str
overwrite: bool
raise_errors_on_exit: bool
save_on_exit: bool
save_path: str | None
solve_LAM: bool
classmethod validate_FEM_order(v)[source]
classmethod validate_comm(v)[source]
classmethod validate_mode(v)[source]
classmethod validate_model(v)[source]
classmethod validate_solve_LAM(v)[source]
classmethod validate_verbose(v)[source]
verbose: int
cideMOD.models.model_options.get_model_options(model='P2D', **kwargs) BaseModelOptions[source]

Factory method that returns the model options object of the selected model