Wiki

Clone wiki

Simflowny / UserGuide_PDEProblem

Creating PDE problems

Creating PDE problems

In order to create a PDE problem template, from the document manager click on the Add button and select "PDE Problem". This opens the document editor with the minimal information required for PDE problems:


images/UserGuide/PDEproblemtemplate.png

Head

Head information is commonly used in several documents in Simflowny. See more detail in Head.

Basic data

The basic data covers all that can be considered variables in a document. Problem and model have a common basic data, see more detail in Basic data.

Models

Models are referenced in problems in a similar way for every document type for Simflowny. Please, check Model for usage.

Region

Simple models contain only one region, where heterogeneity is only given as a result of different initial values for the problem fields. An example of this may be a pool with a fluid, or a region of space filled by an electromagnetic field. The context in these cases is provided by boundary conditions, which establish the relation between the problem region and its surroundings.

However, more complex scenarios involve different regions governed by different physical models. Most realistic simulation scenarios fall into this category. Some examples are:

  • Physiological simulations: cardiac dynamics, vessel dynamics, muscular dynamics, neurological simulations, etc.
  • 3D worlds, with different physics for soil, buildings, avatars, air,...
  • Quantum chemistry, involving the creation and destruction of chemical bounds
  • Bioinformatic simulations, such as protein folding, DNA dynamics, cell dynamics, etc.

The Region tag allows the definition of the basic region, covering the whole simulation domain. In case a multi-region problem, the optional tag Subregions can be added to set as extra subregions as desired to the default one. Main Region is identified by a Name.

Furthermore, it is also possible to define the domain region empty (without any model and initial conditions) and define subregions within that domain region. This is useful in particle simulations when, initially, particles does not cover all the domain, but the evolution may move them all over the whole domain.

A region is composed by the following elements.

Spatial Domain

Visit Spatial Domain for detailed usage.

Interior Models (Optional)

Interior Models tag is used to state the behaviour of the region. The evolution equations of the models set in these tags are going to be executed for the region.

Initial Conditions (Optional)

Visit Initial Conditions for detailed usage.

Interactions

The combination of different regions with potentially different models raises the question of how to deal with the interface between regions. Simflowny allows different strategies:

  • Surface models: for each region it is possible to define different models for the volume (interior) and the surface. This permits, for instance, a surface model defining fields that will be useful for neighbour regions. This characteristic is only available in Subregions
  • Region interaction: it is possible to override the model of a region with static terms on the surface of contact with a specific regions.

The Region element can only have region interactions. Given a particular region, one may define a specific interaction with another region or boundary. In order to define such interactions, one must add a Interactions element using the region contextual menu. In particular, interactions consist of:

  • The list of regions to interact with (Target Regions)
  • The terms that overwrite the model equations in the region interaction interface. The terms defined in the interaction will be applied to all the fields in the region regardless of the information propagation speed and the orientation of the interaction surface.

There are three king of interactions: Field Interaction, Eigen Vector Interaction and a generic Interaction

When choosing Field Interaction, the terms defined in the interaction will be applied to all the fields in the region regardless of the information propagation speed and the orientation of the interaction surface.

With the Eigen Vector Interaction (to be used only if the associated models contain full general characteristic decomposition information), expressions will depend on an arbitrary unit vector, n = [nx , ny , nz], also tensors fields will be projected on transverse and along directions of vector n, and only such eigen vectors with incoming characteristic speed will be computed according to the region interaction expressions rather than to their regular expressions. In particular, what it is being done is to compute the predicted eigen vectors according to their regular expression, then to check for eigen vectors with incoming characteristic speeds and correct them according to the expressions defined in the region interaction and, finally, use the undiagonalization expressions to recover the evolution fields.

Choosing Interaction, expressions are defined similarly as it is made for the evolution equations. Please, go to evolution equations section in the PDE Model User Guide for a detailed explanation of how to define the terms.

Even with all the options that users have to define region interactions, it is important to point out a common potential problem that could be found when dealing with incompatible regions; this is, regions making use of fields not defined in an adjacent region. The computation of derivatives in points close to the interphase will fail since it requires the evaluation of the fields in the neighbour points. Simflowny overcomes this problem by automatically detecting incompatible regions and performing an extrapolation of the missing fields. Currently, three extrapolation algorithms are supported, namely, Linear, Quadratic and Cubic spline (where the number of interior data points used in the extrapolation can be chosen by the user). This information is provided by the user in the discretization policy.

Below a picture of a projection for variable φ from am interaction:


images/UserGuide/regionInteractionPDE.png

Field groups (Optional)

Grouping fields can be useful for discretization schemes using different algorithms for different fields. Defining groups of fields in the regions enables the usage of these specific schemes. Check Discretization Policies for more detail.


images/UserGuide/fieldGroups.png

Subregions (Optional)

Subregions are similar to regions with a few additional options. Visit Subregions for detailed usage.

Subregion precedence (Optional)

When having a multi-region problem, some of the regions may overlap in space. Simflowny does not allow regions sharing space (if the user wants, a new region with two models can be set to share domain space). Therefore, it is important to specify a region order. This can be defined using the optional Subregion Precedence element. The user can set relations of precedent-surrogated region pairs in order to stablish the proper space mapping of the regions.

Analysis field equations (Optional)

As stated previously, analysis fields are applied to problems. However, their setting are similar than model equations. Please, visit Auxiliary variables definition to see a detailed description of the tags.

Auxiliary analysis variable equations (Optional)

Auxiliary definition variables are used to simplify expressions in the analysis calculations. These variables are not stored in memory, and consequently, not saved to disk with the analysis fields. So they can be used to perform complex calculations in the analysis and, at the same time, save disk space.

Their setting are similar than model equations. Please, visit Auxiliary variables definition to see a detailed description of the tags.

Boundary conditions

Boundary conditions are defined in a similar way for both PDE types. For further detail, visit Boundary Conditions.

Finalization conditions

Finalization conditions are defined in a similar way in Simflowny problems. For further detail, visit Finalization Conditions.

Next steps

At this point, the reader is able to develop PDE problems in Simflowny. The following step in Simflowny flow is the Discretization.

Updated