33 #ifndef __H__UG__PLUGINS__NAVIER_STOKES__INCOMPRESSIBLE__FV1__NAVIER_STOKES_FV1__
34 #define __H__UG__PLUGINS__NAVIER_STOKES__INCOMPRESSIBLE__FV1__NAVIER_STOKES_FV1__
45 #include "../incompressible_navier_stokes_base.h"
46 #include "../../upwind_interface.h"
145 template<
typename TDomain>
164 NavierStokesFV1(
const std::vector<std::string>& vFct,
const std::vector<std::string>& vSubset);
191 {
m_spStab = CreateNavierStokesStabilization<dim>(name);
197 spStab->set_diffusion_length(diffLength);
221 else UG_THROW(
"Upwind must be specified previously.\n");
223 else UG_THROW(
"Stabilization must be specified previously.\n");
234 virtual void prepare_setting(
const std::vector<LFEID>& vLfeID,
bool bNonRegularGrid);
250 template <
typename TElem,
typename TFVGeom>
265 template <
typename TElem,
typename TFVGeom>
269 template <
typename TElem,
typename TFVGeom>
336 template <
typename TElem,
typename TFVGeom>
406 template <
typename TElem,
typename TFVGeom>
432 template <
typename TElem,
typename TFVGeom>
460 template <
typename TElem,
typename TFVGeom>
483 template <
typename TElem,
typename TFVGeom>
518 template <
typename TFVGeom>
523 template <
typename TElem,
typename TFVGeom>
536 template <
typename TElem,
typename TFVGeom>
584 template <
typename TElem,
typename TFVGeom>
void register_func();
function NavierStokes(fcts, subsets, discType)
SmartPtr< CplUserData< number, dim > > user_data()
Definition: stabilization.h:62
Definition: upwind_interface.h:57
Finite Volume Element Discretization for the incompressible Navier-Stokes Equation.
Definition: incompressible_navier_stokes_base.h:146
SmartPtr< DataExport< MathMatrix< dim, dim >, dim > > m_exVelocityGrad
Export for the velocity gradient.
Definition: incompressible_navier_stokes_base.h:262
number m_bFullNewtonFactor
factor for exact jacobian, (1 for exact jacobian, 0 for fix point)
Definition: navier_stokes_base.h:207
bool m_bLaplace
flag if using only laplace term
Definition: incompressible_navier_stokes_base.h:256
SmartPtr< DataExport< MathVector< dim >, dim > > m_exVelocity
Export for the velocity.
Definition: incompressible_navier_stokes_base.h:259
bool m_bStokes
flag if solving the Stokes equation
Definition: incompressible_navier_stokes_base.h:253
bool m_bPecletBlend
flag if using Peclet Blending
Definition: incompressible_navier_stokes_base.h:244
static const int dim
World dimension.
Definition: incompressible_navier_stokes_base.h:156
Finite Volume Element Discretization for the incompressible Navier-Stokes Equation.
Definition: navier_stokes_fv1.h:148
void ex_nodal_velocity(MathVector< dim > vValue[], const MathVector< dim > vGlobIP[], number time, int si, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< TFVGeom::dim > vLocIP[], const size_t nip, bool bDeriv, std::vector< std::vector< MathVector< dim > > > vvvDeriv[])
export value of the velocity
Definition: navier_stokes_fv1.cpp:898
void prep_elem_loop(const ReferenceObjectID roid, const int si)
prepares the element loop
Definition: navier_stokes_fv1.cpp:139
void prep_elem(const LocalVector &u, GridObject *elem, const ReferenceObjectID roid, const MathVector< dim > vCornerCoords[])
prepares the element for evaluation
Definition: navier_stokes_fv1.cpp:211
void set_upwind(const std::string &name)
sets the upwind based on a string identifier
Definition: navier_stokes_fv1.h:213
SmartPtr< CplUserData< number, dim > > kinematic_viscosity()
returns kinematic viscosity
Definition: navier_stokes_fv1.h:171
virtual void init()
Definition: navier_stokes_fv1.cpp:63
void fsh_elem_loop()
finishes the element loop
Definition: navier_stokes_fv1.cpp:204
number peclet_blend(MathVector< dim > &UpwindVel, const TFVGeom &geo, size_t ip, const MathVector< dim > &StdVel, number kinVisco)
computes the pecled blended Upwind veloctity
Definition: navier_stokes_fv1.cpp:876
DataImport< MathVector< dim >, dim > m_imSourceSCVF
Definition: navier_stokes_fv1.h:551
DataImport< MathVector< dim >, dim > m_imSourceSCV
Data import for source.
Definition: navier_stokes_fv1.h:550
IncompressibleNavierStokesBase< TDomain > base_type
Base class type.
Definition: navier_stokes_fv1.h:151
DataImport< MathVector< dim >, dim > sourceSCVF()
returns scvf source
Definition: navier_stokes_fv1.h:183
virtual void prepare_setting(const std::vector< LFEID > &vLfeID, bool bNonRegularGrid)
type of trial space for each function used
Definition: navier_stokes_fv1.cpp:91
void set_stabilization(const std::string &name)
sets stabilization based on string identifier
Definition: navier_stokes_fv1.h:190
DataImport< number, dim > m_imKinViscosity
Data import for kinematic viscosity.
Definition: navier_stokes_fv1.h:554
void add_def_A_elem(LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
adds the stiffness part to the local defect
Definition: navier_stokes_fv1.cpp:600
void register_func()
Definition: navier_stokes_fv1.cpp:1164
NavierStokesFV1< TDomain > this_type
own type
Definition: navier_stokes_fv1.h:154
void set_source(SmartPtr< CplUserData< MathVector< dim >, dim > > user)
sets the source function
Definition: navier_stokes_fv1.cpp:126
void set_upwind(SmartPtr< INavierStokesFV1Stabilization< dim > > spStab)
sets a stabilization for upwinding (Physical Advection Correction)
Definition: navier_stokes_fv1.h:205
void add_rhs_elem(LocalVector &d, GridObject *elem, const MathVector< dim > vCornerCoords[])
adds the source part to the local defect
Definition: navier_stokes_fv1.cpp:844
SmartPtr< INavierStokesFV1Stabilization< dim > > m_spConvStab
Definition: navier_stokes_fv1.h:565
SmartPtr< CplUserData< number, dim > > density()
returns density
Definition: navier_stokes_fv1.h:177
virtual void register_all_funcs(bool bHang)
void add_jac_A_elem(LocalMatrix &J, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
adds the stiffness part to the local jacobian
Definition: navier_stokes_fv1.cpp:253
void add_def_M_elem(LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
adds the mass part to the local defect
Definition: navier_stokes_fv1.cpp:814
DataImport< number, dim > m_imDensitySCV
Definition: navier_stokes_fv1.h:558
NavierStokesFV1(const char *functions, const char *subsets)
Definition: navier_stokes_fv1.cpp:46
void set_stabilization(SmartPtr< INavierStokesFV1Stabilization< dim > > spStab)
sets the stabilization used to compute the stabilized velocities
Definition: navier_stokes_fv1.h:186
static const int dim
World dimension.
Definition: navier_stokes_fv1.h:158
void set_stabilization(const std::string &name, const std::string &diffLength)
sets stabilization and diff length method based on string identifier (only for Schneider-Raw stabiliz...
Definition: navier_stokes_fv1.h:195
SmartPtr< INavierStokesUpwind< dim > > m_spConvUpwind
Upwinding for velocity in convective term of momentum equation.
Definition: navier_stokes_fv1.h:568
void set_pac_upwind(bool bPac)
Definition: navier_stokes_fv1.h:217
virtual std::string disc_type() const
returns string identifying disc type
Definition: navier_stokes_fv1.h:237
static const size_t _P_
abbreviation for pressure
Definition: navier_stokes_fv1.h:571
void ex_velocity_grad(MathMatrix< dim, dim > vValue[], const MathVector< dim > vGlobIP[], number time, int si, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const MathVector< TFVGeom::dim > vLocIP[], const size_t nip, bool bDeriv, std::vector< std::vector< MathMatrix< dim, dim > > > vvvDeriv[])
computes the value of the gradient of the velocity
Definition: navier_stokes_fv1.cpp:997
void set_density(SmartPtr< CplUserData< number, dim > > user)
sets the density
Definition: navier_stokes_fv1.cpp:118
SmartPtr< INavierStokesFV1Stabilization< dim > > stabilization()
returns stabilization
Definition: navier_stokes_fv1.h:202
void add_jac_M_elem(LocalMatrix &J, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
adds the mass part to the local jacobian
Definition: navier_stokes_fv1.cpp:784
void set_kinematic_viscosity(SmartPtr< CplUserData< number, dim > > user)
sets the kinematic viscosity
Definition: navier_stokes_fv1.cpp:111
DataImport< number, dim > m_imDensitySCVF
Data import for density.
Definition: navier_stokes_fv1.h:557
void set_upwind(SmartPtr< INavierStokesUpwind< dim > > spUpwind)
sets an upwinding for the convective term of momentum equation
Definition: navier_stokes_fv1.h:209
SmartPtr< INavierStokesFV1Stabilization< dim > > m_spStab
Stabilization for velocity in continuity equation.
Definition: navier_stokes_fv1.h:561
const NullSmartPtr SPNULL