Initial Condition

Advection Initial Conditions

This pages describes the functions that apply initial conditions

Dictionary that maps IC names to functions. Every new IC should be added to the list

source

AdvectionEquationMod.ICFile

This function reads a vector from a file on disk and set the solution to it. The vector must contain the same number of entries as there are degrees of freedom in the mesh.

This function is useful for things like restarting from a checkpoint. In this case, the file should be the output of writedlm(eqn.q). The degree of freedom number must be the same for both simulation for this to work (the file contains no degree of freedom number information).

Inputs

  • mesh

  • sbp

  • eqn

  • opts

Inputs/Outputs

  • u0: vector to populate with the solution

    Aliasing restrictions: none.

source

AdvectionEquationMod.ICexp_xplusy

Computes the initial conditions for the state variable u = exp(x + y + z), z is omitted in 2d

Inputs

  • mesh : AbstractMesh type

  • sbp : Summation-by-parts operator

  • eqn : Advection equation object

  • opts : Options dictionary

  • u0 : Array that stores inital state variables

Outputs

  • None

source

AdvectionEquationMod.ICx5plusy5

Computes the initial conditions for the state variable u = x^5 + y^5 + z^5; z is omitted it 2d

Inputs

  • mesh : AbstractMesh type

  • sbp : Summation-by-parts operator

  • eqn : Advection equation object

  • opts : Options dictionary

  • u0 : Array that stores inital state variables

Outputs

  • None

source