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

Modify MxTransp to handle single species case #870

Merged
merged 7 commits into from
Apr 10, 2023

Conversation

tulioricci
Copy link
Collaborator

Questions for the review:

  • Is the scope and purpose of the PR clear?
    • The PR should have a description.
    • The PR should have a guide if needed (e.g., an ordering).
  • Is every top-level method and class documented? Are things that should be documented actually so?
  • Is the interface understandable? (I.e. can someone figure out what stuff does?) Is it well-defined?
  • Does the implementation do what the docstring claims?
  • Is everything that is implemented covered by tests?
  • Do you see any immediate risks or performance disadvantages with the design? Example: what do interface normals attach to?

Comment on lines 476 to 482
# floor to avoid single-species case breaking the mixture rule
epsilon = 1e-4

# if one species dominate, uses a small diffusivity.
# The actual number should't matter since, in the single-species case,
# diffusion is proportional to a nearly zero-gradient.
dummy_diffusivity = 1e-6
Copy link
Member

Choose a reason for hiding this comment

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

Can we make these class parameters so that the user can set them if desired?

@tulioricci tulioricci marked this pull request as ready for review April 10, 2023 16:31
@tulioricci tulioricci merged commit f3be8e3 into mixture-transport Apr 10, 2023
@tulioricci tulioricci deleted the tulio/mix-transp-eps branch April 10, 2023 16:33
tulioricci added a commit that referenced this pull request Apr 10, 2023
* Fix up boundary treatments per Mengaldo

* fix?

* Update boundary.py file

* Update initializers.py file

* Update misc.rst and test_bc.py

* Update pulse-mpi.py

* Fixes after checking the test and examples

* Flake8 boundary.py

* Remove line that was making the test fail

* Remove missing class from docs thingy

* Add missing boundary class in module doc

* Update mirgecom/initializers.py

Removing excessive piece of code

Co-authored-by: Mike Campbell <[email protected]>

* Flake8 initializers.py

* Bring the None check to __init__ in LinearOutBC

* Add ortho axis util

* Docstyle

* Add state option to initializers.py

* switch install.sh to Open MPI

* more details

* Including 3D slip wall BC

* Fixing flake8 in boundary.py

* Update outflow --> pressureoutflow

* put in adiabatic slip

* small changes to pass docs

* Add rot mat util, test

* Update calls to rotmat

* Fix up axes getter call with new API

* Update docs for new boundary routine.

* Update boundary.py

fix bug in tensor multiplication

* update adiabatic slip to specify a flux instead of using numerical flux function

* Add smoothness to see how production behaves

* Of course it wouldn't work

* Use custom production branch

* Fix doc err

* Add Tulios fix for creating smoothness field.

* Undo production env customization

* Add fluid API test for limiting

* Clean up some lingering linting ish

* Dropping pre-computing viscosity because it is only useful for PowerLaw, but not for other transport models

* Some minor tweaks

* Remove janky density-based indicator option.

* disable mypy for imported packages without type stubs

* add CI job

* fix mypy errors

* fix CI

* install

* fix ctypes

* install types

* install explicitly

* Use productions version of these files.

* Apply suggestions from code review

Co-authored-by: Mike Campbell <[email protected]>

* empty commit to trigger CI

* empty commit to bump CI

* flake8 example

* Push to kick CI.

* Update for upstream API changes

* Fix up doc issues?

* Clean up remaining doc ish.

* Add mod pyrometheus to requirements

* Pressure and temperature were inverted

* Try override for mixture averaged diffusivity routine.

* Spell num_species corretly.

* Spell make_array properly.

* Disable override func

* Remove override function for pyro.get_species_mass_diffusivities_mixavg

* Add option to turn off inviscid terms in CNS operator.

* Deflake8

* partial update

* tweak mengaldo BC code

1) separate individual aspects of BCs (adiabatic, slip, etc.) into their
   own component classes
2) use *_plus for values that will be used in conjunction with *_minus
   values in numerical flux functions, and *_bc for values that will be
   used to compute flux directly

* use grad_temperature_bc instead of grad_temperature_plus

* changing smoothness to smoothness_mu, preparing for additional smoothness variables

* remove duplicated inviscid/viscous flux methods

* first stab at adding beta and kappa smoothness

* make inviscid/viscous flux internal variables

* change grad_momentum_bc to grad_velocity_bc in _SlipBoundaryComponent and use it in SymmetryBoundary

* deprecate SymmetryBoundary

* add comment about energy for inviscid

* only use _ldg_bnd_flux_for_grad in mengaldo BCs

* rename state_plus to state_plus_inviscid and explain why

* don't pass callbacks to base class constructor unless they're expected to be used

* add FIXME

* add some docstrings

* simplify cv_plus/cv_bc construction by using cv.replace

* add replace_fluid_state function and use it to further simplify state construction in BCs

* tweak some docstrings

* add note

* updating transport class to use new smoothness

* restore SymmetryBoundary docstring to avoid unused reference error in doc build

* Reset CI

* Deawkwardize doc wording.

* updates to new transport class

* Deflake8

* Make clear that lewis must be an array

* cleaning up and fixing examples

* Try to fix doc err.

* Partial update

* Refactor Mengaldo: Isothermal, and Adiabatic for clarity

* Update doublemach to provide its own boundary.  This AV is deprecated, preparing for removal

* Matts changes update 1.

* Add Matts replace fluid state helper

* Use smoothness consistent

* Switch to mengaldo bcs

* Update doc with boundary interface change.

* Undo test changes

* Random cleanup

* Remove duplicate func.

* Update docs

* Add another Poinsot ref, fix doc err?

* Extricate AV-specific junk from fluid boundaries.

* Extricate AV from fluid boundaries.

* Use production MANIFEST.in, try to fix gmsh ish with doublemach.

* Try to fix Porter gmsh issue.

* Update per final review comments

* Update outdated comment

* Remove old doc entry

* Update add smoothed transport (#861)

* Add option to turn off inviscid terms in CNS operator.

* Deflake8

* partial update

* tweak mengaldo BC code

1) separate individual aspects of BCs (adiabatic, slip, etc.) into their
   own component classes
2) use *_plus for values that will be used in conjunction with *_minus
   values in numerical flux functions, and *_bc for values that will be
   used to compute flux directly

* use grad_temperature_bc instead of grad_temperature_plus

* remove duplicated inviscid/viscous flux methods

* make inviscid/viscous flux internal variables

* change grad_momentum_bc to grad_velocity_bc in _SlipBoundaryComponent and use it in SymmetryBoundary

* deprecate SymmetryBoundary

* add comment about energy for inviscid

* only use _ldg_bnd_flux_for_grad in mengaldo BCs

* rename state_plus to state_plus_inviscid and explain why

* don't pass callbacks to base class constructor unless they're expected to be used

* add FIXME

* add some docstrings

* simplify cv_plus/cv_bc construction by using cv.replace

* add replace_fluid_state function and use it to further simplify state construction in BCs

* tweak some docstrings

* add note

* restore SymmetryBoundary docstring to avoid unused reference error in doc build

* Reset CI

* Deawkwardize doc wording.

* Make clear that lewis must be an array

* Add option to turn off inviscid terms in CNS operator. (#856)

Co-authored-by: tulioricci <[email protected]>

* Try to fix doc err.

* Adding variable spec. diff to PowerLawTransp (#772)

Co-authored-by: Mike Campbell <[email protected]>
Co-authored-by: Matthias Diener <[email protected]>

* Partial update

* Refactor Mengaldo: Isothermal, and Adiabatic for clarity

* Update doublemach to provide its own boundary.  This AV is deprecated, preparing for removal

* Matts changes update 1.

* Add Matts replace fluid state helper

* Use smoothness consistent

* Switch to mengaldo bcs

* Update doc with boundary interface change.

* Undo test changes

* Random cleanup

* Remove duplicate func.

* Update docs

* Add another Poinsot ref, fix doc err?

* Extricate AV-specific junk from fluid boundaries.

* Extricate AV from fluid boundaries.

* Use production MANIFEST.in, try to fix gmsh ish with doublemach.

* Update lingering bcs

* Update per final review comments

* Update outdated comment

---------

Co-authored-by: Matthew Smith <[email protected]>
Co-authored-by: tulioricci <[email protected]>
Co-authored-by: Tulio <[email protected]>
Co-authored-by: Matthias Diener <[email protected]>

* Merge upstream changes

* Use zeros_like, not 0*

* Zero smoothness

* Modify MxTransp to handle single species case (#870)

Check for singular case

* Remove volume_viscosity from interface

---------

Co-authored-by: Mike Campbell <[email protected]>
Co-authored-by: Matthias Diener <[email protected]>
Co-authored-by: Mike Anderson <[email protected]>
Co-authored-by: anderson2981 <[email protected]>
Co-authored-by: Matthew Smith <[email protected]>
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