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 solution(ncomp_t system, ncomp_t ncomp, 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 system, ncomp_t ncomp, tk::real, tk::real y, tk::real z) -> 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

auto solinc(ncomp_t system, ncomp_t ncomp, tk::real x, tk::real y, tk::real z, tk::real t, tk::real dt) const -> std::vector<tk::real>
Evaluate the increment from t to t+dt of the analytical solution at (x,y,z) for all components.
void errchk(ncomp_t system, ncomp_t ncomp) const
Do error checking on PDE parameters.
void side(std::unordered_set<int>& conf) const
Query all side set IDs the user has configured for all components in this PDE system.

Function documentation

static std::vector<tk::real> inciter::TransportProblemShearDiff::solution(ncomp_t system, ncomp_t ncomp, tk::real x, tk::real y, tk::real z, tk::real t)

Evaluate analytical solution at (x,y,z,t) for all components.

Parameters
system in Equation system index
ncomp in Number of components in this transport equation system
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 system, ncomp_t ncomp, tk::real, tk::real y, tk::real z)

Assign prescribed shear velocity at a point.

Parameters
system in Equation system index, i.e., which transport equation system we operate on among the systems of PDEs
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]

std::vector<tk::real> inciter::TransportProblemShearDiff::solinc(ncomp_t system, ncomp_t ncomp, tk::real x, tk::real y, tk::real z, tk::real t, tk::real dt) const

Evaluate the increment from t to t+dt of the analytical solution at (x,y,z) for all components.

Parameters
system in Equation system index
ncomp in Number of components in this transport equation system
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 increment starting from
dt in Time increment at which evaluate the solution increment to
Returns Increment in values of all components evaluated at (x,y,t+dt)

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

Do error checking on PDE parameters.

Parameters
system in Equation system index, i.e., which transport equation system we operate on among the systems of PDEs
ncomp in Number of components in this transport equation

void inciter::TransportProblemShearDiff::side(std::unordered_set<int>& conf) const

Query all side set IDs the user has configured for all components in this PDE system.

Parameters
conf in/out Set of unique side set IDs to add to