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

Improvements and bug fixes for LTE+Mixing-Length model #223

Merged
merged 10 commits into from
Aug 25, 2023

Conversation

trevilo
Copy link
Contributor

@trevilo trevilo commented Aug 24, 2023

These mods have been in use on dev branches for awhile, so it is time to get them onto main.

This includes

  1. bug fixes in the mixing length edd viscosity calculation (divergence wasn't handled correctly)
  2. improvements in the cycle-averaged solver handling of the electrical conductivity
  3. bug fixes in the LTE model

For a variable order restart, in M2ulPhyS::restart_files_hdf5, the
primitive variable array was initialized incorrectly.  In a practical
simulation, this is irrelevant, since the primitives are computed
prior to the evaluation of the right-hand-side.  But, if we are going
to bother to do it (e.g., in case a visualization file is written
before a time step is taken), the calculation should be correct.
@trevilo trevilo force-pushed the lte-mix-usability-rebase branch 2 times, most recently from e39f68c to 8e85298 Compare August 24, 2023 03:14
Before it was based on the divergence free piece of the strain rate
tensor S, but it should be just S itself.
@trevilo trevilo self-assigned this Aug 24, 2023
@trevilo trevilo added bug Something isn't working enhancement New feature or request labels Aug 24, 2023

transportBuffer[FluxTrns::VISCOSITY] += mut;
transportBuffer[FluxTrns::BULK_VISCOSITY] += mut;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

generalize this.


visc[0] += mut;
visc[1] += mut;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

generalize this

After fixes to mixing length viscosity calc, as well as bug fix in
getting the distance fcn on shared faces, and using the useBCinGrad
option to get some regression coverage on that code path.
First, evaluate electrical conductivity in LTE transport.  Second,
make sure electron thermal conductivity is initialized (to zero) by
LTE transport.  The reason to set it to zero is that it is already
incorporated into the "total" conductivity that is used to set the
heavy species conductivity.  Since the flux function adds the electron
conductivity (in the single T model), we must set it to zero to avoid
either using potentially uninitialized space or double counting a
piece of the conductivity.
to allow user to supply a function of space if desired.  An example is
in comments, but leave the standard case as just a constant.
This function allows us to update the electrical conductivity just
prior to EM solve, which is required for proper restarts.  Also, we
include a flag enabling the user to skip this update.  This can be
useful for ramping up cases by generating a Joule heating based on an
artificial electrical conductivity field.
from becoming negative (joule) or too small (conductivity)
B/c there is now a check for negative Joule heating where the forcing
is added, this test has changed slightly.  B/c of interpolation, the
Joule heating can go slightly negative on the flow mesh, which is
happening in this case.  Previously these negative values were added.
Now, the Joule heating is only added if it is non-negative.  This
modification changes the solution, leading to this reference solution
update.
@trevilo
Copy link
Contributor Author

trevilo commented Aug 25, 2023

Unable to reproduce failing inflow_outflow.test. Opened issue #224 to track that, but otherwise ready to merge, so I'm not holding this up for that.

@trevilo trevilo marked this pull request as ready for review August 25, 2023 18:29
@trevilo trevilo merged commit 044f0f5 into main Aug 25, 2023
10 checks passed
@trevilo trevilo deleted the lte-mix-usability-rebase branch July 19, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant