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

Initial low Mach reacting flow capabilities #281

Merged
merged 43 commits into from
Jun 6, 2024
Merged

Conversation

trevilo
Copy link
Contributor

@trevilo trevilo commented Jun 4, 2024

This PR replaces #274. The main idea is the same: to add the argon transport and chemistry that is supported on the compressible flow path to the low Mach path.

In order to merge quickly and avoid drift between this branch and main, in this initial PR, some necessary items are not present, including

  • the coupling to the EM drive and radiation is not yet present,
  • the quasi-neutrality constraint is not yet supported
  • partial assembly / gpu offloading is not supported

These capabilities will be added in separate PRs.

Sigfried Haering and others added 30 commits June 4, 2024 09:09
* rough skeleton of new features added but nothign hooked up
* added mixture, transport, and chemistry instantiation in reactingFlow constructor
* added rx to assert check:
* runs but temp does not converge in first step
* valgrind errors galore
The primitive state was being filled with mass fractions for the
species entries and then passed to GetConservativesFromPrimitives, but
this function expects that the species entries of the primitive state
contain molar densities.  Because of this, the returned conserved
state was incorrect and the resulting molar densities returned by
computeNumberDensities were also incorrect, which then made the
species production terms incorrect.
Three bug fixes here:

1) The units of the formation energy from the input file is J / mol,
so we need to divide by the species weight (kg / mol) here to get the
formation energy per unit mass.

2) The vector hw_ was sizes to have entries for all species and the
contributions were not summed.  We need hw_ to be a scalar field with
the contributions from all species summed.

3) Sign error

Note that this commit does not add the sensible enthalpy contribution
(see Poinsot and Veynante, Theoretical and Numerical Combustion, 2005,
eq. 1.62).
Species history update was out of order.
to energy eqn rhs in ReactingFlow::heatOfFormation.  Not general b/c
Cv is hardcoded.  Just for investigation.  Don't merge this.
Three bugs were found and fixed while working on the low Mach analog
to argon_minimal.binary.test.  The fixes are

1) In ReactingFlow::speciesStep, set the initial guess for
the iterative linear solve to the mass fraction for the current
species from the previous time step.  Because of how Yn_next_gf_ is
managed, that was not the case and sometimes the electron species
solve in particular struggled because of it.

2) Multiply the diffusivities returned by
computeMixtureAverageDiffusivity by the mixture density (i.e., so that
the diffision term in the species equation is div( \rho D \grad Y) ).

3) Populate the species entries of the primitive state in
ReactingFlow::updateDiffusivity with the mole densities, rather than
the mass fraction.
Two mods:

1) Set velocity to 0.  Because of a bug, the test was generated with 0
velocity rather than what the input file said.

2) Tighten linear solver tolerance.
Was always too tight.  Bug fix in LQ_form_ DiffusionIntegrator
coefficient in CaloricallyPerfectThermoChem was enough to push it past
tolerance.  Given linear solver tolerances, updated values seem
reasonable.
trevilo and others added 12 commits June 4, 2024 09:13
Need to check with shaering about this.
It appears that the computeMixtureAverageDiffusivity functions have
tripped up the cuda support for virtual functions, as we have
encountered prieviously (e.g., #203).  For the moment, I hack around
the problem by introducing an unused argument in
computeMixtureAverageDiffusivity, which makes its signature
sufficiently unique that the problem doesn't occur.
To more closely match the original compressible path test.
To better match original compressible path test
We don't (yet) support ambipolar (quasi-neutral) or two-temperature on
the low Mach reacting path.  Die if detected.
…ion term now consistent with Poinsot book eq 1.67.
@trevilo trevilo self-assigned this Jun 4, 2024
@trevilo trevilo mentioned this pull request Jun 4, 2024
@trevilo trevilo added the enhancement New feature or request label Jun 5, 2024
@trevilo trevilo marked this pull request as ready for review June 5, 2024 01:20
@trevilo trevilo requested a review from shaering June 5, 2024 01:20
@trevilo trevilo merged commit 5a1d673 into main Jun 6, 2024
18 checks passed
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.

None yet

1 participant