Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ThermalDEM] Heat generation features #13003

Merged
merged 15 commits into from
Jan 13, 2025
5 changes: 4 additions & 1 deletion applications/ThermalDEMApplication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ set( KRATOS_THERMAL_DEM_APPLICATION_CORE_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/custom_constitutive/radiation/radiation_continuum_zhou.cpp
${CMAKE_CURRENT_SOURCE_DIR}/custom_constitutive/real_contact/real_contact_model.cpp
${CMAKE_CURRENT_SOURCE_DIR}/custom_constitutive/real_contact/real_contact_lu.cpp
${CMAKE_CURRENT_SOURCE_DIR}/custom_constitutive/real_contact/real_contact_morris.cpp
${CMAKE_CURRENT_SOURCE_DIR}/custom_constitutive/real_contact/real_contact_zhou.cpp
${CMAKE_CURRENT_SOURCE_DIR}/custom_constitutive/real_contact/real_contact_morris_area.cpp
${CMAKE_CURRENT_SOURCE_DIR}/custom_constitutive/real_contact/real_contact_morris_area_time.cpp
${CMAKE_CURRENT_SOURCE_DIR}/custom_constitutive/real_contact/real_contact_rangel_area.cpp
${CMAKE_CURRENT_SOURCE_DIR}/custom_constitutive/real_contact/real_contact_rangel_area_time.cpp
${CMAKE_CURRENT_SOURCE_DIR}/custom_elements/thermal_spheric_particle.cpp
${CMAKE_CURRENT_SOURCE_DIR}/custom_elements/thermal_spheric_continuum_particle.cpp
${CMAKE_CURRENT_SOURCE_DIR}/custom_elements/sintering_spheric_continuum_particle.cpp
Expand Down
95 changes: 55 additions & 40 deletions applications/ThermalDEMApplication/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

This application is an extension of the [DEM Application](https://github.com/KratosMultiphysics/Kratos/tree/master/applications/DEMApplication) to include **thermal effects** such as:

- Heat transfer between particle-particle, particle-rigid wall, and particle-surrounding fluid.
- Heat transfer between particle-particle, particle-wall, and particle-surrounding fluid.
- Heat transfer mechanisms by conduction, convection, and radiation.
- Heat generation by energy dissipation and internal sources.
- Temperature dependent material properties.

Theoretical information on thermal DEM analysis can be found [here](./ThermalDEMTheory.pdf).
Theoretical information on thermal DEM analysis can be found [here](https://doi.org/10.5281/zenodo.13846126).

A [Matlab version](https://gitlab.com/rafaelrangel/demlab) of this application is also available.
A [Matlab version](https://github.com/rlrangel/DEMLab) of this application is also available.

## Table of Contents
- [Authorship](#authorship)
Expand Down Expand Up @@ -124,17 +124,20 @@ Add **thermal settings** with desired options:

Add **post options** with desired options:

"PostTemperature" : true or false,
"PostHeatFlux" : true or false,
"PostGraphParticleTempMin" : true or false,
"PostGraphParticleTempMax" : true or false,
"PostGraphParticleTempAvg" : true or false,
"PostGraphParticleTempDev" : true or false,
"PostGraphModelTempAvg" : true or false,
"PostGraphHeatFluxContributions" : true or false,
"PostGraphHeatGenContributions" : true or false,
"PostGraphEnergyContributions" : true or false,
"PostMapHeatGeneration" : true or false
"PostTemperature" : true or false,
"PostHeatFlux" : true or false,
"PostGraphParticleTempMin" : true or false,
"PostGraphParticleTempMax" : true or false,
"PostGraphParticleTempAvg" : true or false,
"PostGraphParticleTempAvgVol" : true or false,
"PostGraphParticleTempDev" : true or false,
"PostGraphMechanicalEnergy" : true or false,
"PostGraphDissipatedEnergy" : true or false,
"PostGraphThermalEnergy" : true or false,
"PostGraphHeatFluxContributions" : true or false,
"PostGraphHeatGenerationValues" : true or false,
"PostGraphHeatGenerationContributions" : true or false,
"PostHeatMapGeneration" : true or false

### Materials (json file)

Expand Down Expand Up @@ -209,35 +212,35 @@ Add **SubModelPartData** to sub model parts with desired options:
- *"thermal_integration_scheme"*:\
Selected scheme for time integration of thermal problem.\
Default: "forward_euler"

- *"numerical_integration_method"*:\
Selected metohd for solving integration expressions numerically.\
Default: "adaptive_simpson"

- *"thermal_solve_frequency"*:\
Number of steps in which thermal problem is solved.\
Default: 1

- *"voronoi_tesselation_frequency"*:\
Number of steps in which Voronoi diagram is built, in case it is required.\
Default: 1000

- *"porosity_update_frequency"*:\
Number of steps in which porosity is computed, in case it is required.\
Default: 1000

- *"automatic_solve_frequency"*:\
Boolean for automatically setting the thermal solve frequency based on the maximum allowed time step (it overrides the value set for thermal_solve_frequency).\
Default: false

- *"compute_motion"*:\
Boolean for solving mechanical problem.\
Default: true

- *"compute_direct_conduction"*:\
Boolean for computing heat transfer between elements by direct conduction.\
Default: true

- *"compute_indirect_conduction"*:\
Boolean for computing heat transfer between elements by indirect conduction.\
Default: false
Expand Down Expand Up @@ -277,7 +280,7 @@ Add **SubModelPartData** to sub model parts with desired options:
- *"heat_generation_model"*:\
List of selected models for simulating heat generation by energy dissipation.\
Default: ["sliding_friction"]

- *"adjusted_contact_model"*:\
Selected model for adjusting contact geometry.\
Default: "zhou"
Expand All @@ -301,7 +304,7 @@ Add **SubModelPartData** to sub model parts with desired options:
- *"conduction_radius"*:\
Radius of cylindrical conductive region (ratio of particles radii) required for conduction model "batchelor_obrien_complete" and "batchelor_obrien_modified".\
Default: 1.0

- *"fluid_layer_thickness"*:\
Thickness of particle fluid layer (ratio of particles radii) required for conduction model "surrounding_layer".\
Default: 0.4
Expand Down Expand Up @@ -337,7 +340,7 @@ Add **SubModelPartData** to sub model parts with desired options:
- *"heat_map_subdivisions"*:\
Number of subdivisions in X,Y,Z directions to defined the grid of the heat map.\
Default: [10,10,10]

- *"global_fluid_properties"*:\
Prescribed values for the properties of the interstitial fluid, assumed as constant throughout all the analysis (fluid behavior does not change as it is not simulated).

Expand Down Expand Up @@ -377,47 +380,59 @@ Add **SubModelPartData** to sub model parts with desired options:
- *"PostTemperature"*:\
Boolean for showing elements temperature in post processing.\
Default: false

- *"PostHeatFlux"*:\
Boolean for showing elements heat flux in post processing.\
Default: false

- *"PostGraphParticleTempMin"*:\
Boolean for writing a graph with the minimum particle temperature.\
Default: false

- *"PostGraphParticleTempMax"*:\
Boolean for writing a graph with the maximum particle temperature.\
Default: false

- *"PostGraphParticleTempAvg"*:\
Boolean for writing a graph with the average temperature of all particles.\
Default: false


- *"PostGraphParticleTempAvgVol"*:\
Boolean for writing a graph with the volume-weighted average temperature of all particles.\
Default: false

- *"PostGraphParticleTempDev"*:\
Boolean for writing a graph with the standard deviation of the temperature of all particles.\
Default: false
- *"PostGraphModelTempAvg"*:\
Boolean for writing a graph with the weighted average of the temperature of all particles (taking the particles volume into account).\

- *"PostGraphMechanicalEnergy"*:\
Boolean for writing a graph with the mechanical energy components of all partilces.\
Default: false


- *"PostGraphDissipatedEnergy"*:\
Boolean for writing a graph with the accumulated energy dissipation of all partilces.\
Default: false

- *"PostGraphThermalEnergy"*:\
Boolean for writing a graph with the accumulated thermal energy (from heat generation by energy dissipation) of all partilces.\
Default: false

- *"PostGraphHeatFluxContributions"*:\
Boolean for writing a graph with the contribution of each heat transfer mechanism to the total heat transfer.\
Default: false

- *"PostGraphHeatGenContributions"*:\
Boolean for writing a graph with the contribution of each heat generation mechanism to the total heat generation.\
- *"PostGraphHeatGenerationValues"*:\
Boolean for writing a graph with the total values of each heat generation mechanism.\
Default: false
- *"PostGraphEnergyContributions"*:\
Boolean for writing a graph with the energy composition (conservative and accumulated dissipative components) of all partilces.\

- *"PostGraphHeatGenerationContributions"*:\
Boolean for writing a graph with the contribution of each heat generation mechanism to the total heat generation.\
Default: false

- *"PostMapHeatGeneration"*:\
Boolean for assemblying and writing the density map of heat generation.\
- *"PostHeatMapGeneration"*:\
Boolean for assemblying and writing the heat map of heat generation.\
Default: false

**Material properties**
- *"materials.Variables.THERMAL_CONDUCTIVITY"*:\
Thermal conductivity of material (always required).
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
// Main authors: Rafael Rangel ([email protected])
//

#if !defined(DIRECT_CONDUCTION_MODEL_BOB_COMPLETE_H_INCLUDED)
#define DIRECT_CONDUCTION_MODEL_BOB_COMPLETE_H_INCLUDED
#pragma once

// System includes

Expand Down Expand Up @@ -92,5 +91,3 @@ namespace Kratos
}

} // namespace Kratos

#endif // DIRECT_CONDUCTION_MODEL_BOB_COMPLETE_H_INCLUDED
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
// Main authors: Rafael Rangel ([email protected])
//

#if !defined(DIRECT_CONDUCTION_MODEL_BOB_MODIFIED_H_INCLUDED)
#define DIRECT_CONDUCTION_MODEL_BOB_MODIFIED_H_INCLUDED
#pragma once

// System includes

Expand Down Expand Up @@ -81,5 +80,3 @@ namespace Kratos
}

} // namespace Kratos

#endif // DIRECT_CONDUCTION_MODEL_BOB_MODIFIED_H_INCLUDED
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
// Main authors: Rafael Rangel ([email protected])
//

#if !defined(DIRECT_CONDUCTION_MODEL_BOB_SIMPLE_H_INCLUDED)
#define DIRECT_CONDUCTION_MODEL_BOB_SIMPLE_H_INCLUDED
#pragma once

// System includes

Expand Down Expand Up @@ -78,5 +77,3 @@ namespace Kratos
}

} // namespace Kratos

#endif // DIRECT_CONDUCTION_MODEL_BOB_SIMPLE_H_INCLUDED
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace Kratos {
// Get collision time and impact normal velocity
typename ThermalSphericParticle::ContactParams contact_params = particle->GetContactParameters();
const double col_time = r_process_info[TIME] - contact_params.impact_time;
const double impact_normal_velocity = fabs(contact_params.impact_velocity[0]);
const double impact_normal_velocity = std::abs(contact_params.impact_velocity[0]);

// Compute max collision time
double col_time_max = 0.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
// Main authors: Rafael Rangel ([email protected])
//

#if !defined(DIRECT_CONDUCTION_MODEL_COLLISION_H_INCLUDED)
#define DIRECT_CONDUCTION_MODEL_COLLISION_H_INCLUDED
#pragma once

// System includes

Expand Down Expand Up @@ -78,5 +77,3 @@ namespace Kratos
}

} // namespace Kratos

#endif // DIRECT_CONDUCTION_MODEL_COLLISION_H_INCLUDED
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
// Main authors: Rafael Rangel ([email protected])
//

#if !defined(DIRECT_CONDUCTION_MODEL_H_INCLUDED)
#define DIRECT_CONDUCTION_MODEL_H_INCLUDED
#pragma once

// System includes

Expand Down Expand Up @@ -81,5 +80,3 @@ namespace Kratos
}

} // namespace Kratos

#endif // DIRECT_CONDUCTION_MODEL_H_INCLUDED
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
// Main authors: Rafael Rangel ([email protected])
//

#if !defined(DIRECT_CONDUCTION_MODEL_PIPE_H_INCLUDED)
#define DIRECT_CONDUCTION_MODEL_PIPE_H_INCLUDED
#pragma once

// System includes

Expand Down Expand Up @@ -78,5 +77,3 @@ namespace Kratos
}

} // namespace Kratos

#endif // DIRECT_CONDUCTION_MODEL_PIPE_H_INCLUDED
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
// Main authors: Rafael Rangel ([email protected])
//

#if !defined(INDIRECT_CONDUCTION_MODEL_H_INCLUDED)
#define INDIRECT_CONDUCTION_MODEL_H_INCLUDED
#pragma once

// System includes

Expand Down Expand Up @@ -81,5 +80,3 @@ namespace Kratos
}

} // namespace Kratos

#endif // INDIRECT_CONDUCTION_MODEL_H_INCLUDED
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ namespace Kratos {
c = sqrt(1.0 - r_in * r_in);

// Heat transfer coefficient from analytical solution of the integral expression
return 2.0 * Globals::Pi * fluid_conductivity * particle_radius * ((a + 1.0) * log(fabs(b - a - 1.0) / fabs(a - c + 1.0)) + b - c);
return 2.0 * Globals::Pi * fluid_conductivity * particle_radius * ((a + 1.0) * log(std::abs(b - a - 1.0) / std::abs(a - c + 1.0)) + b - c);

KRATOS_CATCH("")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
// Main authors: Rafael Rangel ([email protected])
//

#if !defined(INDIRECT_CONDUCTION_MODEL_SURROUNDING_LAYER_H_INCLUDED)
#define INDIRECT_CONDUCTION_MODEL_SURROUNDING_LAYER_H_INCLUDED
#pragma once

// System includes

Expand Down Expand Up @@ -83,5 +82,3 @@ namespace Kratos
}

} // namespace Kratos

#endif // INDIRECT_CONDUCTION_MODEL_SURROUNDING_LAYER_H_INCLUDED
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
// Main authors: Rafael Rangel ([email protected])
//

#if !defined(INDIRECT_CONDUCTION_MODEL_VARGAS_H_INCLUDED)
#define INDIRECT_CONDUCTION_MODEL_VARGAS_H_INCLUDED
#pragma once

// System includes

Expand Down Expand Up @@ -78,5 +77,3 @@ namespace Kratos
}

} // namespace Kratos

#endif // INDIRECT_CONDUCTION_MODEL_VARGAS_H_INCLUDED
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
// Main authors: Rafael Rangel ([email protected])
//

#if !defined(INDIRECT_CONDUCTION_MODEL_VORONOI_A_H_INCLUDED)
#define INDIRECT_CONDUCTION_MODEL_VORONOI_A_H_INCLUDED
#pragma once

// System includes

Expand Down Expand Up @@ -86,5 +85,3 @@ namespace Kratos
}

} // namespace Kratos

#endif // INDIRECT_CONDUCTION_MODEL_VORONOI_A_H_INCLUDED
Loading
Loading