SpECTRE
v2024.05.11
|
Reflecting boundary conditions for Newtonian hydrodynamics. More...
#include <Reflection.hpp>
Public Types | |
using | options = tmpl::list<> |
using | dg_interior_evolved_variables_tags = tmpl::list<> |
using | dg_interior_temporary_tags = tmpl::list<> |
using | dg_interior_primitive_variables_tags = tmpl::list< hydro::Tags::RestMassDensity< DataVector >, hydro::Tags::SpatialVelocity< DataVector, Dim >, hydro::Tags::SpecificInternalEnergy< DataVector >, hydro::Tags::Pressure< DataVector > > |
using | dg_gridless_tags = tmpl::list<> |
Public Member Functions | |
Reflection (Reflection &&)=default | |
Reflection & | operator= (Reflection &&)=default |
Reflection (const Reflection &)=default | |
Reflection & | operator= (const Reflection &)=default |
Reflection (CkMigrateMessage *msg) | |
WRAPPED_PUPable_decl_base_template (domain::BoundaryConditions::BoundaryCondition, Reflection) | |
auto | get_clone () const -> std::unique_ptr< domain::BoundaryConditions::BoundaryCondition > override |
void | pup (PUP::er &p) override |
std::optional< std::string > | dg_ghost (gsl::not_null< Scalar< DataVector > * > mass_density, gsl::not_null< tnsr::I< DataVector, Dim, Frame::Inertial > * > momentum_density, gsl::not_null< Scalar< DataVector > * > energy_density, gsl::not_null< tnsr::I< DataVector, Dim, Frame::Inertial > * > flux_mass_density, gsl::not_null< tnsr::IJ< DataVector, Dim, Frame::Inertial > * > flux_momentum_density, gsl::not_null< tnsr::I< DataVector, Dim, Frame::Inertial > * > flux_energy_density, gsl::not_null< tnsr::I< DataVector, Dim, Frame::Inertial > * > velocity, gsl::not_null< Scalar< DataVector > * > specific_internal_energy, const std::optional< tnsr::I< DataVector, Dim, Frame::Inertial > > &face_mesh_velocity, const tnsr::i< DataVector, Dim, Frame::Inertial > &outward_directed_normal_covector, const Scalar< DataVector > &interior_mass_desity, const tnsr::I< DataVector, Dim, Frame::Inertial > &interior_velocity, const Scalar< DataVector > &interior_specific_internal_energy, const Scalar< DataVector > &interior_pressure) const |
Public Member Functions inherited from NewtonianEuler::BoundaryConditions::BoundaryCondition< Dim > | |
BoundaryCondition (BoundaryCondition &&)=default | |
BoundaryCondition & | operator= (BoundaryCondition &&)=default |
BoundaryCondition (const BoundaryCondition &)=default | |
BoundaryCondition & | operator= (const BoundaryCondition &)=default |
BoundaryCondition (CkMigrateMessage *msg) | |
void | pup (PUP::er &p) override |
Public Member Functions inherited from domain::BoundaryConditions::BoundaryCondition | |
BoundaryCondition (BoundaryCondition &&)=default | |
BoundaryCondition & | operator= (BoundaryCondition &&)=default |
BoundaryCondition (const BoundaryCondition &)=default | |
BoundaryCondition & | operator= (const BoundaryCondition &)=default |
BoundaryCondition (CkMigrateMessage *const msg) | |
WRAPPED_PUPable_abstract (BoundaryCondition) | |
virtual auto | get_clone () const -> std::unique_ptr< BoundaryCondition >=0 |
Static Public Attributes | |
static constexpr Options::String | help |
static constexpr evolution::BoundaryConditions::Type | bc_type |
Reflecting boundary conditions for Newtonian hydrodynamics.
Ghost (exterior) data 'mirrors' interior volume data with respect to the boundary interface. i.e. reverses the normal component of velocity while using same values for other scalar quantities.
In the frame instantaneously moving with the same velocity as face mesh, the reflection condition reads
\begin{align*} \vec{u}_\text{ghost} = \vec{u}_\text{int} - 2 (\vec{u}_\text{int} \cdot \hat{n}) \hat{n} \end{align*}
where \(\vec{u}\) is the fluid velocity in the moving frame, "int" stands for interior, and \(\hat{n}\) is the outward normal vector on the boundary interface.
Substituting \(\vec{u} = \vec{v} - \vec{v}_m\), we get
\begin{align*} v_\text{ghost}^i &= v_\text{int}^i - 2[(v_\text{int}^j-v_m^j)n_j]n^i \end{align*}
where \(v\) is the fluid velocity and \(v_m\) is face mesh velocity.
|
overridevirtual |
Implements domain::BoundaryConditions::BoundaryCondition.
|
staticconstexpr |
|
staticconstexpr |