15 #if !defined(SET_MATERIAL_PROPERTIES_FOR_THERMAL_COUPLING_PROCESS)
16 #define SET_MATERIAL_PROPERTIES_FOR_THERMAL_COUPLING_PROCESS
79 ConvectionDiffusionSettings::Pointer my_settings = rCurrentProcessInfo.
GetValue(CONVECTION_DIFFUSION_SETTINGS);
85 double temp = i_node->FastGetSolutionStepValue(TEMPERATURE);
90 double capacity = 0.0;
96 for (
auto& i_nelem : neighbour_elements) {
99 ConstitutiveLaw::Pointer constLaw = i_nelem.GetProperties().GetValue(CONSTITUTIVE_LAW);
100 if (constLaw !=
nullptr) {
103 const Properties& r_properties = constitutive_law_values.GetMaterialProperties();
105 double effective_density = 0.0;
106 double effective_conductivity = 0.0;
107 double effective_capacity = 0.0;
110 if (r_properties.
HasTable(TEMPERATURE, DENSITY)) {
111 const auto& r_table = r_properties.
GetTable(TEMPERATURE, DENSITY);
114 effective_density = r_properties[DENSITY];
117 if (r_properties.
HasTable(TEMPERATURE, CONDUCTIVITY)) {
118 const auto& r_table = r_properties.
GetTable(TEMPERATURE, CONDUCTIVITY);
122 effective_conductivity = r_properties[CONDUCTIVITY];
125 if (r_properties.
HasTable(TEMPERATURE, SPECIFIC_HEAT)) {
126 const auto& r_table = r_properties.
GetTable(TEMPERATURE, SPECIFIC_HEAT);
130 effective_capacity = r_properties[SPECIFIC_HEAT];
136 capacity += effective_capacity;
143 const Variable<double>& rDiffusionVar = my_settings->GetDiffusionVariable();
144 const Variable<double>& rSpecificHeatVar = my_settings->GetSpecificHeatVariable();
146 i_node->FastGetSolutionStepValue(rDensityVar) =
density /
n;
147 i_node->FastGetSolutionStepValue(rDiffusionVar) =
conductivity /
n;
148 i_node->FastGetSolutionStepValue(rSpecificHeatVar) = capacity /
n;
162 rOStream << std::endl;
TDataType & GetValue(const Variable< TDataType > &rThisVariable)
Gets the value associated with a given variable.
Definition: data_value_container.h:268
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
NodeIterator NodesEnd(IndexType ThisIndex=0)
Definition: model_part.h:497
The base class for all processes in Kratos.
Definition: process.h:49
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: process.h:204
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: process.h:210
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
bool HasTable(const TXVariableType &XVariable, const TYVariableType &YVariable) const
Definition: properties.h:584
TableType & GetTable(const TXVariableType &XVariable, const TYVariableType &YVariable)
Definition: properties.h:376
This process sets the nodal value of thermal properties (density, conductivity and capacity) that dep...
Definition: set_material_properties_for_thermal_coupling_process.hpp:39
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: set_material_properties_for_thermal_coupling_process.hpp:57
ModelPart & rThermalModelPart
Definition: set_material_properties_for_thermal_coupling_process.hpp:72
SetMaterialPropertiesForThermalCouplingProcess(ModelPart &fluid_model_part, ModelPart &thermal_model_part)
Constructor.
Definition: set_material_properties_for_thermal_coupling_process.hpp:46
void ExecuteInitializeSolutionStep() override
This function will be executed at every time step BEFORE performing the solve phase.
Definition: set_material_properties_for_thermal_coupling_process.hpp:67
void ExecuteInitialize() override
This function is designed for being called at the beginning of the computations right after reading t...
Definition: set_material_properties_for_thermal_coupling_process.hpp:65
void operator()()
Definition: set_material_properties_for_thermal_coupling_process.hpp:53
KRATOS_CLASS_POINTER_DEFINITION(SetMaterialPropertiesForThermalCouplingProcess)
~SetMaterialPropertiesForThermalCouplingProcess() override
Destructor.
Definition: set_material_properties_for_thermal_coupling_process.hpp:51
ModelPart & rFluidModelPart
Definition: set_material_properties_for_thermal_coupling_process.hpp:71
TResultType GetValue(TArgumentType const &X) const
Definition: piecewize_linear_table.h:138
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
fluid_model_part
Definition: edgebased_PureConvection.py:18
float conductivity
Definition: face_heat.py:55
float density
Definition: face_heat.py:56
int n
manufactured solution and derivatives (u=0 at z=0 dudz=0 at z=domain_height)
Definition: ode_solve.py:402
float temp
Definition: rotating_cone.py:85
Definition: constitutive_law.h:189