gemseo / problems / dataset

Show inherited members

burgers module

Burgers dataset

This Dataset contains solutions to the Burgers’ equation with periodic boundary conditions on the interval \([0, 2\pi]\) for different time steps:

\[u_t + u u_x = \nu u_{xx},\]

An analytical expression can be obtained for the solution, using the Cole-Hopf transform:

\[u(t, x) = - 2 \nu \frac{\phi'}{\phi},\]

where \(\phi\) is solution to the heat equation \(\phi_t = \nu \phi_{xx}\).

This Dataset is based on a full-factorial design of experiments. Each sample corresponds to a given time step \(t\), while each feature corresponds to a given spatial point \(x\).

More information about Burgers’ equation

class gemseo.problems.dataset.burgers.BurgersDiscipline[source]

Bases: MDODiscipline

A software integrated in the workflow.

To be used, subclass MDODiscipline and implement the _run() method which defines the execution of the software. Typically, _run() gets the input data stored in the local_data, passes them to the callable computing the output data, e.g. a software, and stores these output data in the local_data.

Then, the end-user calls the execute() method with optional input_data; if not, default_inputs are used.

This execute() method uses name grammars to check the variable names and types of both the passed input data before calling run() and the returned output data before they are stored in the cache. A grammar can be either a SimpleGrammar or a JSONGrammar, or your own which derives from BaseGrammar.

cache: AbstractCache | None

The cache containing one or several executions of the discipline according to the cache policy.

data_processor: DataProcessor

A tool to pre- and post-process discipline data.

exec_for_lin: bool

Whether the last execution was due to a linearization.

input_grammar: BaseGrammar

The input grammar.

jac: dict[str, dict[str, ndarray]]

The Jacobians of the outputs wrt inputs.

The structure is {output: {input: matrix}}.

name: str

The name of the discipline.

output_grammar: BaseGrammar

The output grammar.

re_exec_policy: ReExecutionPolicy

The policy to re-execute the same discipline.

residual_variables: Mapping[str, str]

The output variables mapping to their inputs, to be considered as residuals; they shall be equal to zero.

run_solves_residuals: bool

Whether the run method shall solve the residuals.

gemseo.problems.dataset.burgers.create_burgers_dataset(n_samples=30, n_x=501, fluid_viscosity=0.1, categorize=True)[source]

Burgers dataset parametrization.

Parameters:
  • n_samples (int) –

    The number of samples.

    By default it is set to 30.

  • n_x (int) –

    The number of spatial points.

    By default it is set to 501.

  • fluid_viscosity (float) –

    The fluid viscosity.

    By default it is set to 0.1.

  • categorize (bool) –

    Whether to distinguish between the different groups of variables.

    By default it is set to True.

Returns:

The Burgers dataset.

Return type:

IODataset

Examples using create_burgers_dataset

KL-SVD on Burgers equation

KL-SVD on Burgers equation

PCA on Burgers equation

PCA on Burgers equation