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

LES Transport and Unity Lewis Numbers #167

Merged
merged 7 commits into from
Jan 13, 2023

Conversation

baperry2
Copy link
Collaborator

This PR enables LES transport models for scalars and momentum in PeleLMeX. The turbulent viscosity is computed either using constant coefficient Smagorinsky or WALE. Turbulent transport for species and enthalpy are applied using this turbulent viscosity and constant assumed turbulent Schmidt and Prandtl numbers.

A few notes on the implementation:

  • Turbulent viscosity is computed based on the velocity field at the old timestep (N). Because the velocity field is not updated until the very end of the timestep, this means that when diffusion terms at N+1 are computed, the turbulent part fo the diffusion coefficient is still based on data for timestep N. This limitation would also be present for the IAMR implementation.
  • Turbulent viscosity is now computed at faces (based on velocity gradients from an AMReX TensorOp) and added to the face viscosity in the getDiffusivity function, just before applying zeroVisc function.
  • The TensorOp function doesn't support EB yet, so that capability will need to be added later
  • This PR also pulls in the unity Lewis number diffusion feature from LM, as that may often be desired for LES.
  • Documentation included, a suitable regtest will be added in a later PR
  • This PR replaces LES support and unity Le #126

Array4<Real const>(state_arr[box_no], TEMP),
Array4<Real >(cp_arr[box_no]) );
});

Copy link
Collaborator

Choose a reason for hiding this comment

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

You'll need to add a Gpu::streamSynchronize() at this point because the multiarrays ParallelFor are non-blocking.

Array4<Real >(mut_arr[box_no]) );
});
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same Gpu::streamSynchronize() comment here.

@@ -17,6 +17,14 @@ PeleLM::LevelData::LevelData(amrex::BoxArray const& ba,
press.define( amrex::convert(ba,IntVect::TheNodeVector()),
dm, 1 , 1 , MFInfo(), factory);
visc_cc.define( ba, dm, 1 , 1 , MFInfo(), factory);
if (a_do_les) {
for (int i; i < AMREX_SPACEDIM; ++i) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Need int i{0}; otherwise I get uninitialized data.

@esclapez esclapez self-requested a review January 13, 2023 19:04
Copy link
Collaborator

@esclapez esclapez left a comment

Choose a reason for hiding this comment

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

It looks good to me. Tested on a couple of simple cases successfully.
Thanks Bruce !

@esclapez esclapez merged commit 4780b5c into AMReX-Combustion:development Jan 13, 2023
@baperry2 baperry2 deleted the lesmodel_faces branch September 6, 2024 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants