-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add heat transfer #108
base: main
Are you sure you want to change the base?
Add heat transfer #108
Conversation
double thermal_coeff; | ||
double kappa; | ||
double cp; | ||
bool constant_conductivity; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this refers to the "micro-conductivity"? Perhaps call it "constant_microconductivity"?
|
||
BaseDynamicTemperatureModel( const double _delta, const double _kappa, | ||
const double _cp, | ||
const bool _constant_conductivity = true ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do we do if we want a different micro-conductivity than the constant one?
kappa = _kappa; | ||
cp = _cp; | ||
const double d3 = _delta * _delta * _delta; | ||
thermal_coeff = 9.0 / 2.0 * _kappa / pi / d3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be analogous to Line 52 in CabanaPD_ForceModels_PMB.hpp. I was wondering if we should use a more clear description. There, we used "c". However using "k" may not be good.
constant_conductivity = _constant_conductivity; | ||
} | ||
|
||
KOKKOS_INLINE_FUNCTION double conductivity_function( double r ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the function be called "microconductivity_function"?
} | ||
|
||
template <class ParticleType> | ||
void stepEuler( const ParticleType& particles, const double dt ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note we are using "forward" Euler
|
||
const double coeff = | ||
model.thermal_coeff * model.conductivity_function( xi ); | ||
conduction( i ) += |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is conduction(i) initialized? Is this in Line 111: Cabana::deep_copy( conduction, 0.0 ); ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's correct
@@ -672,8 +675,8 @@ class Particles<MemorySpace, PMB, TemperatureDependent, Dimension> | |||
|
|||
// These are split since weighted volume only needs to be communicated once | |||
// and dilatation only needs to be communicated for LPS. | |||
using scalar_type = typename base_type::scalar_type; | |||
using aosoa_temp_type = Cabana::AoSoA<scalar_type, memory_space, 1>; | |||
using temp_types = Cabana::MemberTypes<double, double>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this change for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to store the temperature diffusion separate from the current temperature
@@ -252,6 +252,135 @@ auto createForceModel( PMB, Fracture, ParticleType particles, | |||
delta, K, G0, temp, alpha, temp0 ); | |||
} | |||
|
|||
template <typename TemperatureType> | |||
struct ForceModel<PMB, Elastic, DynamicTemperature, TemperatureType> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got confused about this. The heat transfer does not introduce a new mechanics model. What is this part for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All model details are included in the same object - mechanical and thermal. And confirming your point, the code below mostly just combines the two existing models
The difference between the critical time step of heat transfer and mechanics requires: |
… heat transfer example
Adds new heat transfer capability; part of #110
New example copies existing thermal deformation example