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

Add heat transfer #108

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Add heat transfer #108

wants to merge 15 commits into from

Conversation

streeve
Copy link
Collaborator

@streeve streeve commented Jun 28, 2024

Adds new heat transfer capability; part of #110

New example copies existing thermal deformation example

  • replacing the body term with a boundary condition
  • adding heat transfer
  • new thermal critical timestep

@streeve streeve added the enhancement New feature or request label Jun 28, 2024
@streeve streeve self-assigned this Jun 28, 2024
src/CabanaPD_Types.hpp Outdated Show resolved Hide resolved
src/CabanaPD_HeatTransfer.hpp Outdated Show resolved Hide resolved
src/CabanaPD_HeatTransfer.hpp Show resolved Hide resolved
src/CabanaPD_Input.hpp Outdated Show resolved Hide resolved
src/CabanaPD_Types.hpp Outdated Show resolved Hide resolved
// ====================================================
// Boundary condition
// ====================================================
// EXAMPLE 1: Temperature profile imposed over entire domain
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to remove some of this before merging

src/CabanaPD_HeatTransfer.hpp Outdated Show resolved Hide resolved
double thermal_coeff;
double kappa;
double cp;
bool constant_conductivity;
Copy link
Collaborator

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 )
Copy link
Collaborator

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;
Copy link
Collaborator

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
Copy link
Collaborator

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 )
Copy link
Collaborator

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 ) +=
Copy link
Collaborator

@pabloseleson pabloseleson Sep 3, 2024

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 ); ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's correct

@pabloseleson
Copy link
Collaborator

The difference between the critical time step of heat transfer and mechanics requires:
(1) A multi-rate time-stepping scheme, where heat transfer is solved every number of time steps. Otherwise, the mechanics time step would be too small for the heat transfer. Thus will allow to solve both the heat transfer and the mechanics.
(2) The mechanics time step may be too small for actual applications, so we may consider implicit time-stepping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants