Nektar++
|
#include <DiffusionLFRNS.h>
Static Public Member Functions | |
static DiffusionSharedPtr | create (std::string diffType) |
Public Attributes | |
Array< OneD, NekDouble > | m_jac |
Array< OneD, Array< OneD, NekDouble > > | m_gmat |
Array< OneD, Array< OneD, NekDouble > > | m_Q2D_e0 |
Array< OneD, Array< OneD, NekDouble > > | m_Q2D_e1 |
Array< OneD, Array< OneD, NekDouble > > | m_Q2D_e2 |
Array< OneD, Array< OneD, NekDouble > > | m_Q2D_e3 |
Array< OneD, Array< OneD, NekDouble > > | m_dGL_xi1 |
Array< OneD, Array< OneD, NekDouble > > | m_dGR_xi1 |
Array< OneD, Array< OneD, NekDouble > > | m_dGL_xi2 |
Array< OneD, Array< OneD, NekDouble > > | m_dGR_xi2 |
Array< OneD, Array< OneD, NekDouble > > | m_dGL_xi3 |
Array< OneD, Array< OneD, NekDouble > > | m_dGR_xi3 |
DNekMatSharedPtr | m_Ixm |
DNekMatSharedPtr | m_Ixp |
Static Public Attributes | |
static std::string | type [] |
Protected Member Functions | |
DiffusionLFRNS (std::string diffType) | |
DiffusionLFRNS uses the Flux Reconstruction (FR) approach to compute the diffusion term. The implementation is only for segments, quadrilaterals and hexahedra at the moment. | |
virtual void | v_InitObject (LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields) |
Initiliase DiffusionLFRNS objects and store them before starting the time-stepping. | |
virtual void | v_SetupMetrics (LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields) |
Setup the metric terms to compute the contravariant fluxes. (i.e. this special metric terms transform the fluxes at the interfaces of each element from the physical space to the standard space). | |
virtual void | v_SetupCFunctions (LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields) |
Setup the derivatives of the correction functions. For more details see J Sci Comput (2011) 47: 50–72. | |
virtual void | v_Diffuse (const int nConvective, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) |
Calculate FR Diffusion for the Navier-Stokes (NS) equations using an LDG interface flux. | |
virtual void | v_NumericalFluxO1 (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &numericalFluxO1) |
Builds the numerical flux for the 1st order derivatives. | |
virtual void | v_WeakPenaltyO1 (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &penaltyfluxO1) |
Imposes appropriate bcs for the 1st order derivatives. | |
virtual void | v_NumericalFluxO2 (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &ufield, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &qfield, Array< OneD, Array< OneD, NekDouble > > &qflux) |
Build the numerical flux for the 2nd order derivatives. | |
virtual void | v_WeakPenaltyO2 (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const int var, const int dir, const Array< OneD, const NekDouble > &qfield, Array< OneD, NekDouble > &penaltyflux) |
Imposes appropriate bcs for the 2nd order derivatives. | |
virtual void | v_DerCFlux_1D (const int nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, const NekDouble > &flux, const Array< OneD, const NekDouble > &iFlux, Array< OneD, NekDouble > &derCFlux) |
Compute the derivative of the corrective flux for 1D problems. | |
virtual void | v_DerCFlux_2D (const int nConvectiveFields, const int direction, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, const NekDouble > &flux, const Array< OneD, NekDouble > &iFlux, Array< OneD, NekDouble > &derCFlux) |
Compute the derivative of the corrective flux wrt a given coordinate for 2D problems. | |
virtual void | v_DivCFlux_2D (const int nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, const NekDouble > &fluxX1, const Array< OneD, const NekDouble > &fluxX2, const Array< OneD, const NekDouble > &numericalFlux, Array< OneD, NekDouble > &divCFlux) |
Compute the divergence of the corrective flux for 2D problems. | |
virtual void | v_DivCFlux_2D_Gauss (const int nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, const NekDouble > &fluxX1, const Array< OneD, const NekDouble > &fluxX2, const Array< OneD, const NekDouble > &numericalFlux, Array< OneD, NekDouble > &divCFlux) |
Compute the divergence of the corrective flux for 2D problems where POINTSTYPE="GaussGaussLegendre". | |
virtual void | v_FluxVec (Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &fluxvector) |
virtual void | v_SetHomoDerivs (Array< OneD, Array< OneD, NekDouble > > &deriv) |
virtual Array< OneD, Array < OneD, Array< OneD, NekDouble > > > & | v_GetFluxTensor () |
Additional Inherited Members | |
Public Member Functions inherited from Nektar::SolverUtils::Diffusion | |
SOLVER_UTILS_EXPORT void | InitObject (LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields) |
SOLVER_UTILS_EXPORT void | Diffuse (const int nConvectiveFields, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) |
SOLVER_UTILS_EXPORT void | FluxVec (Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &fluxvector) |
template<typename FuncPointerT , typename ObjectPointerT > | |
void | SetFluxVector (FuncPointerT func, ObjectPointerT obj) |
void | SetFluxVectorVec (DiffusionFluxVecCB fluxVector) |
template<typename FuncPointerT , typename ObjectPointerT > | |
void | SetFluxVectorNS (FuncPointerT func, ObjectPointerT obj) |
template<typename FuncPointerT , typename ObjectPointerT > | |
void | SetArtificialDiffusionVector (FuncPointerT func, ObjectPointerT obj) |
void | SetFluxVectorNS (DiffusionFluxVecCBNS fluxVector) |
void | SetRiemannSolver (RiemannSolverSharedPtr riemann) |
void | SetHomoDerivs (Array< OneD, Array< OneD, NekDouble > > &deriv) |
virtual Array< OneD, Array < OneD, Array< OneD, NekDouble > > > & | GetFluxTensor () |
Definition at line 45 of file DiffusionLFRNS.h.
|
protected |
DiffusionLFRNS uses the Flux Reconstruction (FR) approach to compute the diffusion term. The implementation is only for segments, quadrilaterals and hexahedra at the moment.
Definition at line 68 of file DiffusionLFRNS.cpp.
Referenced by create().
|
inlinestatic |
Definition at line 48 of file DiffusionLFRNS.h.
References DiffusionLFRNS().
|
protectedvirtual |
Compute the derivative of the corrective flux for 1D problems.
nConvectiveFields | Number of fields. |
fields | Pointer to fields. |
flux | Volumetric flux in the physical space. |
iFlux | Numerical interface flux in physical space. |
derCFlux | Derivative of the corrective flux. |
Definition at line 1629 of file DiffusionLFRNS.cpp.
References Nektar::StdRegions::StdExpansion::GetMetricInfo(), m_dGL_xi1, m_dGR_xi1, Vmath::Smul(), Vmath::Vadd(), and Vmath::Vcopy().
Referenced by v_Diffuse().
|
protectedvirtual |
Compute the derivative of the corrective flux wrt a given coordinate for 2D problems.
There could be a bug for deformed elements since first derivatives are not exactly the same results of DiffusionLDG as expected
nConvectiveFields | Number of fields. |
fields | Pointer to fields. |
flux | Volumetric flux in the physical space. |
numericalFlux | Numerical interface flux in physical space. |
derCFlux | Derivative of the corrective flux. |
Definition at line 1719 of file DiffusionLFRNS.cpp.
References ASSERTL0, Nektar::StdRegions::eBackwards, Nektar::SpatialDomains::eDeformed, Nektar::StdRegions::StdExpansion::GetMetricInfo(), m_dGL_xi1, m_dGL_xi2, m_dGR_xi1, m_dGR_xi2, Vmath::Reverse(), Vmath::Smul(), Vmath::Vadd(), and Vmath::Vsub().
Referenced by v_Diffuse().
|
protectedvirtual |
Calculate FR Diffusion for the Navier-Stokes (NS) equations using an LDG interface flux.
The equations that need a diffusion operator are those related with the velocities and with the energy.
Implements Nektar::SolverUtils::Diffusion.
Definition at line 899 of file DiffusionLFRNS.cpp.
References ASSERTL0, Nektar::LibUtilities::eGaussGaussLegendre, m_BD1, m_D1, m_DD1, m_DFC1, m_DFC2, m_diffDim, m_divFC, m_divFD, m_DU1, Nektar::SolverUtils::Diffusion::m_fluxVectorNS, m_gmat, m_homoDerivs, m_IF1, m_jac, m_tmp1, m_tmp2, m_viscFlux, m_viscTensor, v_DerCFlux_1D(), v_DerCFlux_2D(), v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), v_NumericalFluxO1(), v_NumericalFluxO2(), Vmath::Vadd(), Vmath::Vcopy(), Vmath::Vdiv(), and Vmath::Vmul().
|
protectedvirtual |
Compute the divergence of the corrective flux for 2D problems.
nConvectiveFields | Number of fields. |
fields | Pointer to fields. |
fluxX1 | X1 - volumetric flux in physical space. |
fluxX2 | X2 - volumetric flux in physical space. |
numericalFlux | Interface flux in physical space. |
divCFlux | Divergence of the corrective flux for 2D problems. |
Definition at line 1940 of file DiffusionLFRNS.cpp.
References ASSERTL0, Nektar::StdRegions::eBackwards, m_dGL_xi1, m_dGL_xi2, m_dGR_xi1, m_dGR_xi2, m_Q2D_e0, m_Q2D_e1, m_Q2D_e2, m_Q2D_e3, m_traceNormals, Vmath::Reverse(), Vmath::Vadd(), and Vmath::Vsub().
Referenced by v_Diffuse().
|
protectedvirtual |
Compute the divergence of the corrective flux for 2D problems where POINTSTYPE="GaussGaussLegendre".
nConvectiveFields | Number of fields. |
fields | Pointer to fields. |
fluxX1 | X1-volumetric flux in physical space. |
fluxX2 | X2-volumetric flux in physical space. |
numericalFlux | Interface flux in physical space. |
divCFlux | Divergence of the corrective flux. |
Definition at line 2136 of file DiffusionLFRNS.cpp.
References ASSERTL0, Nektar::StdRegions::eBackwards, m_dGL_xi1, m_dGL_xi2, m_dGR_xi1, m_dGR_xi2, m_Q2D_e0, m_Q2D_e1, m_Q2D_e2, m_Q2D_e3, m_traceNormals, Vmath::Neg(), Vmath::Reverse(), Vmath::Vadd(), Vmath::Vcopy(), and Vmath::Vsub().
Referenced by v_Diffuse().
|
inlineprotectedvirtual |
Definition at line 183 of file DiffusionLFRNS.h.
References m_viscTensor.
|
inlineprotectedvirtual |
Reimplemented from Nektar::SolverUtils::Diffusion.
Definition at line 195 of file DiffusionLFRNS.h.
References m_viscTensor.
|
protectedvirtual |
Initiliase DiffusionLFRNS objects and store them before starting the time-stepping.
This routine calls the virtual functions v_SetupMetrics and v_SetupCFunctions to initialise the objects needed by DiffusionLFRNS.
pSession | Pointer to session reader. |
pFields | Pointer to fields. |
Reimplemented from Nektar::SolverUtils::Diffusion.
Definition at line 83 of file DiffusionLFRNS.cpp.
References m_BD1, m_D1, m_DD1, m_DFC1, m_DFC2, m_diffDim, m_divFC, m_divFD, m_DU1, m_gamma, m_gasConstant, m_IF1, m_mu, m_pInf, m_rhoInf, m_session, m_spaceDim, m_thermalConductivity, m_tmp1, m_tmp2, m_traceVel, m_Twall, m_viscFlux, m_ViscosityType, m_viscTensor, v_SetupCFunctions(), and v_SetupMetrics().
|
protectedvirtual |
Builds the numerical flux for the 1st order derivatives.
Definition at line 1231 of file DiffusionLFRNS.cpp.
References m_traceNormals, m_traceVel, v_WeakPenaltyO1(), Vmath::Vcopy(), and Vmath::Vvtvp().
Referenced by v_Diffuse().
|
protectedvirtual |
Build the numerical flux for the 2nd order derivatives.
Definition at line 1488 of file DiffusionLFRNS.cpp.
References m_traceNormals, m_traceVel, v_WeakPenaltyO2(), Vmath::Vadd(), Vmath::Vmul(), and Vmath::Vvtvp().
Referenced by v_Diffuse().
|
inlineprotectedvirtual |
Reimplemented from Nektar::SolverUtils::Diffusion.
Definition at line 189 of file DiffusionLFRNS.h.
References m_homoDerivs.
|
protectedvirtual |
Setup the derivatives of the correction functions. For more details see J Sci Comput (2011) 47: 50–72.
This routine calls 3 different bases: #eDG_DG_Left - #eDG_DG_Left which recovers a nodal DG scheme, #eDG_SD_Left - #eDG_SD_Left which recovers the SD scheme, #eDG_HU_Left - #eDG_HU_Left which recovers the Huynh scheme.
The values of the derivatives of the correction function are then stored into global variables and reused to compute the corrective fluxes.
pSession | Pointer to session reader. |
pFields | Pointer to fields. |
Definition at line 373 of file DiffusionLFRNS.cpp.
References ASSERTL0, Polylib::jacobd(), m_dGL_xi1, m_dGL_xi2, m_dGL_xi3, m_dGR_xi1, m_dGR_xi2, m_dGR_xi3, and m_diffType.
Referenced by v_InitObject().
|
protectedvirtual |
Setup the metric terms to compute the contravariant fluxes. (i.e. this special metric terms transform the fluxes at the interfaces of each element from the physical space to the standard space).
This routine calls the function #GetEdgeQFactors to compute and store the metric factors following an anticlockwise conventions along the edges/faces of each element. Note: for 1D problem the transformation is not needed.
pSession | Pointer to session reader. |
pFields | Pointer to fields. |
Definition at line 223 of file DiffusionLFRNS.cpp.
References ASSERTL0, Nektar::SpatialDomains::eDeformed, Nektar::StdRegions::StdExpansion::GetMetricInfo(), m_gmat, m_jac, m_Q2D_e0, m_Q2D_e1, m_Q2D_e2, m_Q2D_e3, and m_traceNormals.
Referenced by v_InitObject().
|
protectedvirtual |
Imposes appropriate bcs for the 1st order derivatives.
Definition at line 1288 of file DiffusionLFRNS.cpp.
References Nektar::SpatialDomains::eDirichlet, Nektar::SpatialDomains::eNeumann, Nektar::SpatialDomains::eWallViscous, m_gamma, m_gasConstant, m_Twall, Vmath::Smul(), Vmath::Vadd(), Vmath::Vcopy(), Vmath::Vdiv(), Vmath::Vmul(), Vmath::Vsub(), and Vmath::Zero().
Referenced by v_NumericalFluxO1().
|
protectedvirtual |
Imposes appropriate bcs for the 2nd order derivatives.
Definition at line 1551 of file DiffusionLFRNS.cpp.
References ASSERTL0, Nektar::SpatialDomains::eDirichlet, Nektar::SpatialDomains::eNeumann, m_traceNormals, and Vmath::Vmul().
Referenced by v_NumericalFluxO2().
|
protected |
Definition at line 91 of file DiffusionLFRNS.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 92 of file DiffusionLFRNS.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 93 of file DiffusionLFRNS.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 90 of file DiffusionLFRNS.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 96 of file DiffusionLFRNS.h.
Referenced by v_Diffuse(), and v_InitObject().
Definition at line 63 of file DiffusionLFRNS.h.
Referenced by v_DerCFlux_1D(), v_DerCFlux_2D(), v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), and v_SetupCFunctions().
Definition at line 65 of file DiffusionLFRNS.h.
Referenced by v_DerCFlux_2D(), v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), and v_SetupCFunctions().
Definition at line 67 of file DiffusionLFRNS.h.
Referenced by v_SetupCFunctions().
Definition at line 64 of file DiffusionLFRNS.h.
Referenced by v_DerCFlux_1D(), v_DerCFlux_2D(), v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), and v_SetupCFunctions().
Definition at line 66 of file DiffusionLFRNS.h.
Referenced by v_DerCFlux_2D(), v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), and v_SetupCFunctions().
Definition at line 68 of file DiffusionLFRNS.h.
Referenced by v_SetupCFunctions().
|
protected |
Definition at line 106 of file DiffusionLFRNS.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 108 of file DiffusionLFRNS.h.
Referenced by v_SetupCFunctions().
Definition at line 98 of file DiffusionLFRNS.h.
Referenced by v_Diffuse(), and v_InitObject().
Definition at line 97 of file DiffusionLFRNS.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 89 of file DiffusionLFRNS.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 78 of file DiffusionLFRNS.h.
Referenced by v_InitObject(), and v_WeakPenaltyO1().
|
protected |
Definition at line 79 of file DiffusionLFRNS.h.
Referenced by v_InitObject(), and v_WeakPenaltyO1().
Definition at line 56 of file DiffusionLFRNS.h.
Referenced by v_Diffuse(), and v_SetupMetrics().
Definition at line 103 of file DiffusionLFRNS.h.
Referenced by v_Diffuse(), and v_SetHomoDerivs().
|
protected |
Definition at line 88 of file DiffusionLFRNS.h.
Referenced by v_Diffuse(), and v_InitObject().
DNekMatSharedPtr Nektar::SolverUtils::DiffusionLFRNS::m_Ixm |
Definition at line 69 of file DiffusionLFRNS.h.
DNekMatSharedPtr Nektar::SolverUtils::DiffusionLFRNS::m_Ixp |
Definition at line 70 of file DiffusionLFRNS.h.
Definition at line 55 of file DiffusionLFRNS.h.
Referenced by v_Diffuse(), and v_SetupMetrics().
|
protected |
Definition at line 82 of file DiffusionLFRNS.h.
Referenced by v_InitObject().
|
protected |
Definition at line 85 of file DiffusionLFRNS.h.
Referenced by v_InitObject().
Definition at line 58 of file DiffusionLFRNS.h.
Referenced by v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), and v_SetupMetrics().
Definition at line 59 of file DiffusionLFRNS.h.
Referenced by v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), and v_SetupMetrics().
Definition at line 60 of file DiffusionLFRNS.h.
Referenced by v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), and v_SetupMetrics().
Definition at line 61 of file DiffusionLFRNS.h.
Referenced by v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), and v_SetupMetrics().
|
protected |
Definition at line 84 of file DiffusionLFRNS.h.
Referenced by v_InitObject().
|
protected |
Definition at line 77 of file DiffusionLFRNS.h.
Referenced by v_InitObject().
|
protected |
Definition at line 105 of file DiffusionLFRNS.h.
Referenced by v_InitObject().
|
protected |
Definition at line 83 of file DiffusionLFRNS.h.
Referenced by v_InitObject().
|
protected |
Definition at line 100 of file DiffusionLFRNS.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 101 of file DiffusionLFRNS.h.
Referenced by v_Diffuse(), and v_InitObject().
Definition at line 76 of file DiffusionLFRNS.h.
Referenced by v_DivCFlux_2D(), v_DivCFlux_2D_Gauss(), v_NumericalFluxO1(), v_NumericalFluxO2(), v_SetupMetrics(), and v_WeakPenaltyO2().
Definition at line 75 of file DiffusionLFRNS.h.
Referenced by v_InitObject(), v_NumericalFluxO1(), and v_NumericalFluxO2().
|
protected |
Definition at line 80 of file DiffusionLFRNS.h.
Referenced by v_InitObject(), and v_WeakPenaltyO1().
Definition at line 95 of file DiffusionLFRNS.h.
Referenced by v_Diffuse(), and v_InitObject().
|
protected |
Definition at line 81 of file DiffusionLFRNS.h.
Referenced by v_InitObject().
|
protected |
Definition at line 94 of file DiffusionLFRNS.h.
Referenced by v_Diffuse(), v_FluxVec(), v_GetFluxTensor(), and v_InitObject().
|
static |
Definition at line 53 of file DiffusionLFRNS.h.