Skip to content

Commit

Permalink
Merge pull request #13029 from KratosMultiphysics/thermal-dem-tests
Browse files Browse the repository at this point in the history
[ThermalDEM] Added new tests
  • Loading branch information
rlrangel authored Jan 23, 2025
2 parents 3be55ed + e9c0dd7 commit ec95428
Show file tree
Hide file tree
Showing 237 changed files with 30,976 additions and 391 deletions.
2 changes: 1 addition & 1 deletion applications/ThermalDEMApplication/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Add **thermal settings** with desired options:
"nusselt_correlation" : "sphere_hanz_marshall" or "sphere_whitaker" or "sphere_gunn" or "sphere_li_mason",
"radiation_model" : "continuum_zhou" or "continuum_krause",
"heat_generation_model" : ["sliding_friction","rolling_friction","contact_damping"],
"adjusted_contact_model" : "zhou" or "lu" or "morris",
"adjusted_contact_model" : "zhou" or "lu" or "morris_area" or "morris_area_time" or "rangel_area" or "rangel_area_time",
"voronoi_method" : "tesselation" or "porosity",
"porosity_method" : "global" or "average_convex_hull" or "average_alpha_shape",
"min_conduction_distance" : 0.0000000275,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ namespace Kratos {

const double C_coeff = 0.435 * (sqrt(C2 * C2 - 4.0 * C1 * (C3 - Fo)) - C2) / C1;

return C_coeff * Globals::Pi * Rc_max * Rc_max * pow(col_time_max,-0.5) * temp_grad / (pow(b1,-0.5) + pow(b2,-0.5));
if (!std::isnan(C_coeff)) {
return C_coeff * Globals::Pi * Rc_max * Rc_max * pow(col_time_max,-0.5) * temp_grad / (pow(b1,-0.5) + pow(b2,-0.5));
}
else {
KRATOS_WARNING("Collisional Heat Conduction") << "Multiplying coefficient in NaN (possible high Fourier number). Assuming 0.0..." << std::endl;
return 0.0;
}
}
else {
// Assumption: Use simple BOB model for static contact
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,8 @@ namespace Kratos
KRATOS_TRY

// ATTENTION: Assumption: Original model was not assumed real Young modulus for col_time_max and Rc_max!
const double col_time_max = ComputeMaxCollisionTimeReal();
const double Rc_max = ComputeMaxContactRadiusReal();
const double col_time_max = ComputeMaxCollisionTime();
const double Rc_max = ComputeMaxContactRadius();

if (Rc_max > 0.0)
return GetParticleConductivity() * col_time_max / (GetParticleDensity() * GetParticleHeatCapacity() * Rc_max * Rc_max);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,12 @@ namespace Kratos {
}

// Set new average porosity
r_process_info[AVERAGE_POROSITY] = 1.0 - particle_area / total_area;
double average_porosity = 1.0 - particle_area / total_area;
if (average_porosity < 0.0) {
KRATOS_WARNING("Average Porosity Calculation") << "Porosity is negative. Assuming 0.0..." << std::endl;
average_porosity = 0.0;
}
r_process_info[AVERAGE_POROSITY] = average_porosity;
}

//------------------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,12 @@ namespace Kratos {
}

// Set new average porosity
r_process_info[AVERAGE_POROSITY] = 1.0 - particle_volume / total_volume;
double average_porosity = 1.0 - particle_volume / total_volume;
if (average_porosity < 0.0) {
KRATOS_WARNING("Average Porosity Calculation") << "Porosity is negative. Assuming 0.0..." << std::endl;
average_porosity = 0.0;
}
r_process_info[AVERAGE_POROSITY] = average_porosity;
}

//------------------------------------------------------------------------------------------------------------
Expand Down
13 changes: 0 additions & 13 deletions applications/ThermalDEMApplication/tests/NightTests.py

This file was deleted.

21 changes: 0 additions & 21 deletions applications/ThermalDEMApplication/tests/SmallTests.py

This file was deleted.

39 changes: 0 additions & 39 deletions applications/ThermalDEMApplication/tests/TestFactory.py

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit ec95428

Please sign in to comment.