-
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
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: |
20807aa
to
ffdbe3b
Compare
Adds new heat transfer capability; part of #110
New example copies existing thermal deformation example