14 #if !defined(KRATOS_COMPRESSIBLE_NAVIER_STOKES_EXPLICIT_SOLVING_STRATEGY_BFECC)
15 #define KRATOS_COMPRESSIBLE_NAVIER_STOKES_EXPLICIT_SOLVING_STRATEGY_BFECC
18 #if __cplusplus >= 201703L
49 template <
class TSparseSpace,
class TDenseSpace>
77 #if __cplusplus >= 201703L
86 optional(
const T&
V) noexcept : mHasValue(
true), mValue(
V) { }
88 void reset() noexcept { mHasValue =
false; }
138 typename ExplicitBuilderType::Pointer pExplicitBuilder,
140 int RebuildLevel = 0)
153 int RebuildLevel = 0)
163 typename SolvingStrategyType::Pointer
Create(
168 return Kratos::make_shared<ClassType>(rModelPart, ThisParameters);
186 s <<
"compressible_navier_stokes_explicit_solving_strategy_bfecc";
208 default_parameters.
AddString(
"explicit_solving_strategy",
Name());
212 default_parameters.RecursivelyAddMissingParameters(base_default_parameters);
213 return default_parameters;
224 std::string
Info()
const override
226 std::stringstream ss;
227 ss <<
"CompressibleNavierStokesExplicitSolvingStrategyBFECC";
257 StashDiffusiveConstants();
278 PopDiffusiveConstants();
309 PopDiffusiveConstants();
338 #if __cplusplus >= 201703L
341 std::optional<double> dynamic_viscosity = {};
346 optional<double> dynamic_viscosity = {};
359 void StashDiffusiveConstants()
367 auto& properties =
model_part.ElementsBegin()->GetProperties();
369 if(properties.Has(CONDUCTIVITY))
371 auto& r_conductivity = properties.GetValue(CONDUCTIVITY);
372 mDiffusionStash.conductivity = r_conductivity;
376 if(properties.Has(DYNAMIC_VISCOSITY))
378 auto& r_dynamic_viscosity = properties.GetValue(DYNAMIC_VISCOSITY);
379 mDiffusionStash.dynamic_viscosity = r_dynamic_viscosity;
380 r_dynamic_viscosity = 0;
386 void PopDiffusiveConstants()
394 auto& properties =
model_part.ElementsBegin()->GetProperties();
396 if(mDiffusionStash.conductivity.has_value())
398 properties.SetValue(CONDUCTIVITY, *mDiffusionStash.conductivity);
401 if(mDiffusionStash.dynamic_viscosity.has_value())
403 properties.SetValue(DYNAMIC_VISCOSITY, *mDiffusionStash.dynamic_viscosity);
406 mDiffusionStash.conductivity.reset();
407 mDiffusionStash.dynamic_viscosity.reset();
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:52
CompressibleNavierStokesExplicitSolvingStrategy< ExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace > > BaseType
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:61
std::string Info() const override
Turn back information as a string.
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:224
~CompressibleNavierStokesExplicitSolvingStrategyBFECC() override=default
CompressibleNavierStokesExplicitSolvingStrategyBFECC(ModelPart &rModelPart, Parameters ThisParameters)
Default constructor. (with parameters)
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:120
SolvingStrategy< TSparseSpace, TDenseSpace > SolvingStrategyType
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:58
void FinalizeBFECCForwardSubstep() override
Initialize the BFECC forward substep This method is intended to implement all the operations required...
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:286
void InitializeBFECCForwardSubstep() override
Initialize the BFECC forward substep This method is intended to implement all the operations required...
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:254
void InitializeBFECCBackwardSubstep() override
Initialize the BFECC backward substep This method is intended to implement all the operations require...
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:265
SolvingStrategyType::Pointer Create(ModelPart &rModelPart, Parameters ThisParameters) const override
Create method.
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:163
void InitializeBFECCFinalSubstep() override
Initialize the BFECC final substep This method is intended to implement all the operations required b...
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:275
CompressibleNavierStokesExplicitSolvingStrategyBFECC(ModelPart &rModelPart, bool MoveMeshFlag=false, int RebuildLevel=0)
Default constructor.
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:150
CompressibleNavierStokesExplicitSolvingStrategyBFECC()
Default constructor. (empty)
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:110
Parameters GetDefaultParameters() const override
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:203
BaseType::DofType DofType
The DOF type.
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:70
void FinalizeBFECCBackwardSubstep() override
Finalize the BFECC backward substep This method is intended to implement all the operations required ...
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:296
CompressibleNavierStokesExplicitSolvingStrategyBFECC(ModelPart &rModelPart, typename ExplicitBuilderType::Pointer pExplicitBuilder, bool MoveMeshFlag=false, int RebuildLevel=0)
Default constructor.
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:136
KRATOS_CLASS_POINTER_DEFINITION(CompressibleNavierStokesExplicitSolvingStrategyBFECC)
BaseType::ExplicitBuilderType ExplicitBuilderType
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:67
void FinalizeBFECCFinalSubstep() override
Finalize the BFECC final substep This method is intended to implement all the operations required bef...
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:306
TDenseSpace::VectorType LocalSystemVectorType
The local vector definition.
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:73
static std::string Name()
Returns the name of the class as used in the settings (snake_case format)
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:183
TDenseSpace::MatrixType LocalSystemMatrixType
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:74
CompressibleNavierStokesExplicitSolvingStrategyBFECC(const CompressibleNavierStokesExplicitSolvingStrategyBFECC &Other)=delete
CompressibleNavierStokesExplicitSolvingStrategyBFECC< TSparseSpace, TDenseSpace > ClassType
The definition of the current class.
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:64
Explicit solving strategy base class.
Definition: compressible_navier_stokes_explicit_solving_strategy.h:63
BaseType::ExplicitBuilderType ExplicitBuilderType
The explicit builder and solver definition.
Definition: compressible_navier_stokes_explicit_solving_strategy.h:73
virtual void FinalizeEverySubstep()
Definition: compressible_navier_stokes_explicit_solving_strategy.h:480
void AssignSettings(const Parameters ThisParameters) override
This method assigns settings to member variables.
Definition: compressible_navier_stokes_explicit_solving_strategy.h:193
virtual void InitializeEverySubstep()
Definition: compressible_navier_stokes_explicit_solving_strategy.h:468
Parameters GetDefaultParameters() const override
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: compressible_navier_stokes_explicit_solving_strategy.h:169
virtual void InitializeBFECCFinalSubstep()
Initialize the BFECC final substep This method is intended to implement all the operations required b...
Definition: explicit_solving_strategy_bfecc.h:408
virtual void FinalizeBFECCBackwardSubstep()
Finalize the BFECC backward substep This method is intended to implement all the operations required ...
Definition: explicit_solving_strategy_bfecc.h:402
virtual void InitializeBFECCBackwardSubstep()
Initialize the BFECC backward substep This method is intended to implement all the operations require...
Definition: explicit_solving_strategy_bfecc.h:396
virtual void FinalizeBFECCFinalSubstep()
Finalize the BFECC final substep This method is intended to implement all the operations required aft...
Definition: explicit_solving_strategy_bfecc.h:414
virtual void FinalizeBFECCForwardSubstep()
Finalize the BFECC initial forward substep This method is intended to implement all the operations re...
Definition: explicit_solving_strategy_bfecc.h:390
virtual void InitializeBFECCForwardSubstep()
Initialize the BFECC initial forward substep This method is intended to implement all the operations ...
Definition: explicit_solving_strategy_bfecc.h:384
BaseType::DofType DofType
The DOF type.
Definition: explicit_solving_strategy_bfecc.h:113
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
void AddString(const std::string &rEntry, const std::string &rValue)
This method adds a new string Parameter.
Definition: kratos_parameters.cpp:909
Solving strategy base class This is the base class from which we will derive all the strategies (impl...
Definition: solving_strategy.h:64
ModelPart & GetModelPart()
Operations to get the pointer to the model.
Definition: solving_strategy.h:350
virtual Parameters ValidateAndAssignParameters(Parameters ThisParameters, const Parameters DefaultParameters) const
This method validate and assign default parameters.
Definition: solving_strategy.h:507
bool MoveMeshFlag()
This function returns the flag that says if the mesh is moved.
Definition: solving_strategy.h:290
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
float conductivity
Definition: face_heat.py:55
model_part
Definition: face_heat.py:14
V
Definition: generate_droplet_dynamics.py:256
tuple const
Definition: ode_solve.py:403
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:84
optional(const T &V) noexcept
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:86
bool has_value() const noexcept
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:93
optional() noexcept
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:85
T & operator*() noexcept
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:90
void reset() noexcept
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:88
T operator*() const noexcept
Definition: compressible_navier_stokes_explicit_solving_strategy_bfecc.h:91