Skip to content

Anasol context

Arne Morten Kvarving edited this page Aug 2, 2018 · 1 revision

The <anasol> context is used for specifying analytical solutions to problems. Typically, these go under an application-specific context.

Example:

<anasol type="expression">
  <variables>u=x;
             ux=1;
             uy=0;
             v=-y;
             vx=0;
             vy=-1;
             p=1.5;
  </variables>
  <primary>u|v</primary>
  <scalarprimary>p</scalarprimary>
  <secondary>ux|uy|vx|vy</secondary>
</anasol>

variables

Variables evaluated for all specified functions. For multiple evaluations, separate using ;.

Example:

<variables>r=sqrt(x*x+y*y); theta = cos(x/r)</variables>

primary

The primary solution. For a scalar equation, this will be a scalar function, for vector equations this is the vector solution. Example:

<primary>r|theta</primary>

secondary

The secondary solution. For a scalar equation, this will be a vector function, while for a vector equation, this will be a tensor function.

Example:

<secondary>ux|uy|vx|vy</secondary>

scalarprimary

This is used to specify additional scalar solutions for vector equations. E.g. for the Stokes, the primary solution is the velocity, while the scalar primary solution is the pressure. You can have any number of scalarprimary solutions. They will be ordered according to the input.

Example:

<scalarprimary>x*x</scalarprimary>

scalarsecondary

The secondary solutions associated with the scalarprimary solution. Order must match the order for the primaries.

Example:

<scalarsecondary>px|py</scalarsecondary>