inciter::TransportProblemShearDiff class

Transport PDE problem: diffusion of a shear layer

This class implements the analytical solutions for the test problem, adopted from Okubo Akira Karweit Michael J. , (1969), DIFFUSION FROM A CONTINUOUS SOURCE IN A UNIFORM SHEAR FLOW, Limnology and Oceanography, 14, doi: 10.4319/lo.1969.14.4.0514. In essence, this is a test problem for the advection-diffusion equation in 3D where the analytical solution is known in a closed form as the solution evolves in time. The initial solution is a Gaussian that is advected and diffused in time with an imposed constant-in-time velocity field that features advection and shear. Also, the diffusion coefficients can be different in the three coordinate directions. Note that t0 as well as all three components of the diffusion must be larger than zero at t=t0 to have a well-defined initial condition.

In a nutshell, the equation solved is

\[ \frac{\partial S}{\partial t} + \left(V_0 + \Omega_y y + \Omega_z z \right) \frac{\partial S}{\partial x} = A_x \frac{\partial^2S}{\partial x^2} + A_y \frac{\partial^2S}{\partial y^2} + A_z \frac{\partial^2S}{\partial z^2} \]

whose solution is given by

\[ S(t,x,y,z,) = \frac{1}{8\pi^{3/2}(A_xA_yA_z)^{1/2}t^{3/2} (1+\phi_3^2t^2)^{1/2}} \exp\left[ -\frac{x-V_0t-(\Omega_yy+\Omega_zz)^2/2} {4A_xt(1+\phi_3^2t^2} -\frac{y^2}{4A_yt} -\frac{z^2}{4A_zt} \right] \]

where $ \phi_3^2 = (\Omega_y^2A_y/A_x + \Omega_z^2A_z/A_x)/12$ . See also the paper.

Public static functions

static auto initialize(ncomp_t ncomp, const std::vector<EOS>& mat_blk, tk::real x, tk::real y, tk::real z, tk::real t) -> std::vector<tk::real>
Initialize numerical solution.
static auto analyticSolution(ncomp_t ncomp, const std::vector<EOS>& mat_blk, tk::real x, tk::real y, tk::real z, tk::real t) -> std::vector<tk::real>
Evaluate analytical solution at (x,y,z,t) for all components.
static auto prescribedVelocity(ncomp_t ncomp, tk::real, tk::real y, tk::real z, tk::real) -> std::vector<std::array<tk::real, 3>>
Assign prescribed shear velocity at a point.
static auto type() -> ctr::ProblemType noexcept
Return problem type.

Public functions

void errchk(ncomp_t ncomp) const
Do error checking on PDE parameters.

Function documentation

static std::vector<tk::real> inciter::TransportProblemShearDiff::initialize(ncomp_t ncomp, const std::vector<EOS>& mat_blk, tk::real x, tk::real y, tk::real z, tk::real t)

Initialize numerical solution.

Parameters
ncomp in Number of components in this transport equation system
mat_blk
in X coordinate where to evaluate the solution
in Y coordinate where to evaluate the solution
in Z coordinate where to evaluate the solution
in Time where to evaluate the solution
Returns Values of all components evaluated at (x,y,t)

static std::vector<std::array<tk::real, 3>> inciter::TransportProblemShearDiff::prescribedVelocity(ncomp_t ncomp, tk::real, tk::real y, tk::real z, tk::real)

Assign prescribed shear velocity at a point.

Parameters
ncomp in Number of components in this transport equation
in y coordinate at which to assign velocity
in Z coordinate at which to assign velocity
Returns Velocity assigned to all vertices of a tetrehedron, size: ncomp * ndim = [ncomp][3]

void inciter::TransportProblemShearDiff::errchk(ncomp_t ncomp) const

Do error checking on PDE parameters.

Parameters
ncomp in Number of components in this transport equation