Skip to content

Incompressible fix/periodic channel/transport model consolidation#350

Merged
baperry2 merged 8 commits intoAMReX-Combustion:developmentfrom
ThomasHowarth:development
Mar 6, 2024
Merged

Incompressible fix/periodic channel/transport model consolidation#350
baperry2 merged 8 commits intoAMReX-Combustion:developmentfrom
ThomasHowarth:development

Conversation

@ThomasHowarth
Copy link
Copy Markdown
Contributor

@ThomasHowarth ThomasHowarth commented Mar 1, 2024

This PR does the following:

  1. Fixes the incompressible flag problem raised in pelelm.incompressible flag segfaults #340
  2. Adds the ability to automatically adjust the pressure gradient for a periodic channel flow to maintain the mass flow rate given by the initial condition
  3. Consolidates various transport models into a single function, including generalising the fixed diffusion coefficients, and adding in a scaling that is required for accurate Soret coefficients. This also addresses issue Non-unity Lewis number #337

@marchdf marchdf requested a review from baperry2 March 1, 2024 14:31
This was linked to issues Mar 1, 2024
Copy link
Copy Markdown
Collaborator

@baperry2 baperry2 left a comment

Choose a reason for hiding this comment

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

Thanks for this @ThomasHowarth!

The code looks good! Just a few changes:

  • Handle the clang-tidy errors. We're a bit inconsistent about flags and have a mix of bools and ints. Bools in conditionals should just be like if (boolvar), but ints should be like if (intvar != 0). Sorry this is a bit annoying given the mix of different types.
  • Modify the documentation to account for the changes for constant Le diffusion. I think the only place this comes up is in the list of input file controls:
    #-----------------------DIFFUSION AND LES MODEL CONTROL-----------------------
  • Also add the inputs for the periodic channel pressure gradient stuff to the controls section of the documentation
  • There's one test case that uses unity_Le and the input file should be updated to account for your changes.
    peleLM.unity_Le = 1 # [OPT, DEF=0] Use the unity Lewis number approximation for diffusivities

Comment thread Source/PeleLMeX_Utils.cpp Outdated
Comment thread Source/PeleLMeX_Setup.cpp
@ThomasHowarth
Copy link
Copy Markdown
Contributor Author

I have made all the specified changes. It is perhaps a little convoluted when it comes to the various models possible. Currently, if we run without LES you can fixed Le or Pr. It doesn't need to be both, but both would obviously lead to fixed Sc. With LES, we automatically run with fixed Pr/Sc (and hence fixed Le). Pr and Sc are specified in this case. Hopefully that makes sense, or happy to take suggestions.

Copy link
Copy Markdown
Collaborator

@baperry2 baperry2 left a comment

Choose a reason for hiding this comment

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

Looks good, thanks again @ThomasHowarth

@baperry2 baperry2 merged commit fbf08dd into AMReX-Combustion:development Mar 6, 2024
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.

pelelm.incompressible flag segfaults Non-unity Lewis number

2 participants