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

Phase Change addition #179

Merged
merged 66 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from 65 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
46f237c
First round of changes to add phase change to the most recent MFC ver…
JRChreim May 27, 2023
c4a3761
Changes done to include phase change
JRChreim Jun 7, 2023
ad845ad
3rd set of changes
JRChreim Jun 17, 2023
cf253b0
Final commit Phase Change + MFC
JRChreim Jun 28, 2023
d0befff
A few more changes to phase changer merge
JRChreim Jul 18, 2023
81227dc
[no ci] Make the code compile
henryleberre Jul 19, 2023
ac72abd
[no ci] Final merges phase change
JRChreim Jul 19, 2023
4a077ff
corrections to the phase change module
JRChreim Jul 23, 2023
939e00f
Updates to fie such that CI works
JRChreim Jul 29, 2023
627bb54
Update m_start_up.fpp
JRChreim Jul 29, 2023
c183e7f
First round of changes to add phase change to the most recent MFC ver…
JRChreim May 27, 2023
c93a8e5
Changes done to include phase change
JRChreim Jun 7, 2023
88e1f13
3rd set of changes
JRChreim Jun 17, 2023
2cdc75f
Final commit Phase Change + MFC
JRChreim Jun 28, 2023
649bd1e
[no ci] Make the code compile
henryleberre Jul 19, 2023
3d8b895
[no ci] Final merges phase change
JRChreim Jul 19, 2023
306ac9b
Updates to fie such that CI works
JRChreim Jul 29, 2023
9e3215f
Update m_phase_change.f90
JRChreim Jul 29, 2023
6e7475a
Add --remove-old-tests & Remove long phasechange test cases
henryleberre Aug 8, 2023
71329c7
Update case.py
JRChreim Aug 9, 2023
d9453e7
First round of changes to add phase change to the most recent MFC ver…
JRChreim May 27, 2023
6798415
Changes done to include phase change
JRChreim Jun 7, 2023
99f155f
3rd set of changes
JRChreim Jun 17, 2023
d196b50
Final commit Phase Change + MFC
JRChreim Jun 28, 2023
e23f44b
[no ci] Final merges phase change
JRChreim Jul 19, 2023
c19ce94
Updates to fie such that CI works
JRChreim Jul 29, 2023
0f7d0d9
Update m_start_up.fpp
JRChreim Jul 29, 2023
1d636e2
First round of changes to add phase change to the most recent MFC ver…
JRChreim May 27, 2023
90949c2
Changes done to include phase change
JRChreim Jun 7, 2023
778009e
3rd set of changes
JRChreim Jun 17, 2023
777d1b0
Final commit Phase Change + MFC
JRChreim Jun 28, 2023
462147a
[no ci] Final merges phase change
JRChreim Jul 19, 2023
90eaaaf
Updates to fie such that CI works
JRChreim Jul 29, 2023
542aade
Add --remove-old-tests & Remove long phasechange test cases
henryleberre Aug 8, 2023
a54ee66
Adding OpenACC directives to m_phase_change.f90 module
JRChreim Aug 20, 2023
3bc4741
[no ci] Commit to include OpenAcc statements
JRChreim Sep 6, 2023
b7f47b5
Final commits to Phase CHange + GPU
JRChreim Sep 7, 2023
f8f1a34
Fixes to GPU statements
JRChreim Sep 9, 2023
e9f7a0c
Update case.py
JRChreim Sep 10, 2023
4480b64
update of OpenAcc statements
JRChreim Sep 11, 2023
9ac18b5
Update golden.txt for test A83CADB5
JRChreim Sep 12, 2023
b994db1
Update cases.py
JRChreim Sep 22, 2023
4063e6b
Updating golden files and cases.py that generate those
JRChreim Sep 22, 2023
c4f2acc
changing tolerance to the phase change tests from 1E-12 to 1E-7
JRChreim Sep 22, 2023
37e20fb
[no ci] Further changes to m_phse_change and golden files
JRChreim Sep 25, 2023
0762c32
Golden files regnerated
JRChreim Sep 25, 2023
e3fac58
undoing m_mpi_proxsy.fpp changes for phase change
JRChreim Sep 25, 2023
5970809
Performance manual page and better namelist errors
wilfonba Dec 13, 2023
29d9415
perturb parameter (#252)
sbryngelson Dec 11, 2023
305eedd
requested changes
wilfonba Dec 14, 2023
5c8d442
First round of changes to add phase change to the most recent MFC ver…
JRChreim May 27, 2023
9abf276
Changes done to include phase change
JRChreim Jun 7, 2023
75562e5
3rd set of changes
JRChreim Jun 17, 2023
4cb7c51
Final commit Phase Change + MFC
JRChreim Jun 28, 2023
f8e6887
Updates to fie such that CI works
JRChreim Jul 29, 2023
f66ba79
Changes done to include phase change
JRChreim Jun 7, 2023
5f5277a
3rd set of changes
JRChreim Jun 17, 2023
23c81bb
[no ci] test. Undo afterwards
JRChreim Dec 21, 2023
c092a16
[no ci] test. Undo afterwards
JRChreim Dec 21, 2023
6598cc0
Revert "[no ci] test. Undo afterwards"
JRChreim Dec 21, 2023
a06c8db
Revert "Revert "[no ci] test. Undo afterwards""
JRChreim Dec 21, 2023
50922be
Formatting fixes
JRChreim Dec 22, 2023
35d7464
Update m_phase_change.fpp - to solve requested changes
JRChreim Dec 24, 2023
a4b11e4
Merge branch 'master' into master
JRChreim Dec 24, 2023
66621b7
Changes requested to phase-change
JRChreim Jan 2, 2024
b416fcc
Final Requests
JRChreim Jan 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion docs/documentation/case.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ There are multiple sets of parameters that must be specified in the python input
7. [(Optional) Acoustic Source Parameters](#7-acoustic-source)
8. [(Optional) Ensemble-Averaged Bubble Model Parameters](#8-ensemble-averaged-bubble-model)
9. [(Optional) Velocity Field Setup Parameters](#9-velocity-field-setup)
10. [(Optional) Phase Change Parameters](#10-Phase-Change-Model)

Items 7, 8, and 9 are optional sets of parameters that activate the acoustic source model, ensemble-averaged bubble model, and initial velocity field setup, respectively.
Items 7, 8, 9, and 10 are optional sets of parameters that activate the acoustic source model, ensemble-averaged bubble model, initial velocity field setup, and phase change, respectively.
Definition of the parameters is described in the following subsections.

### 1. Runtime
Expand Down Expand Up @@ -276,20 +277,28 @@ See also `adv_alphan` in table [Simulation Algorithm Parameters](#5-simulation-a
| `pi_inf` | Real | Stiffened-gas parameter $\Pi_\infty$ of fluid. |
| `Re(1)` * | Real | Shear viscosity of fluid. |
| `Re(2)` * | Real | Volume viscosity of fluid. |
| `cv` ** | Real | Sffened-gas parameter $c_v$ of fluid. |
| `qv` ** | Real | Stiffened-gas parameter $q$ of fluid. |
| `qvp` ** | Real | Stiffened-gas parameter $q'$ of fluid. |

Fluid material's parameters. All parameters should be prepended with `fluid_pp(i)` where $i$ is the fluid index.

*: Parameters that work only with `model_eqns`=2.

**: Parameters that work only with `model_eqns`=3.

The table lists the fluid material's parameters.
The parameters define material's property of compressible fluids that are used in simulation.

- `fluid_pp(i)%gamma` and `fluid_pp(i)%pi_inf` define $\Gamma$ and $\Pi$ as parameters of $i$-th fluid that are used in stiffened gas equation of state.

- `fluid_pp(i)%Re(1)` and `fluid_pp(i)%Re(2)` define the shear and volume viscosities of $i$-th fluid, respectively.

When these parameters are undefined, fluids are treated as inviscid.
Details of implementation of viscosity in MFC can be found in [Coralic (2015)](references.md#Coralic15).

- `fluid_pp(i)%cv`, `fluid_pp(i)%qv`, and `fluid_pp(i)%qvp` define $c_v$, $q$, and $q'$ as parameters of $i$-th fluid that are used in stiffened gas equation of state.

### 5. Simulation Algorithm

| Parameter | Type | Description |
Expand Down Expand Up @@ -578,6 +587,21 @@ The parameters are optionally used to define initial velocity profiles and pertu
- `instability_wave` activates the perturbation of initial velocity by instability waves obtained from linear stability analysis for a mixing layer with hyperbolic tangent mean streamwise velocity profile.
This option only works for 2D and 3D cases, together with `vel_profile = TRUE`.

### 10. Phase Change Model
| Parameter | Type | Description |
| ---: | :----: | :--- |
| `relax` | Logical | Activates Phase Change model |
| `relax_model` | Integer | Phase change model: [5] pT-equilibrium; [6] pTg-equilibrium |
| `palpha_eps` | Real | tolerance of the Newton Solver to activate pT-equilibrium |
| `ptgalpha_eps` | Real | tolerance of the Newton Solver to activate pTg-equilibrium |

- `relax` Activates the Phase Change model.

- `relax_model` Specifies the phase change model to be used: [5] enables pT-equilibrium, while [6] activates pTg-equilibrium (if criteria are met).

- `palpha_eps` Specifies the tolerance used for the Newton Solvers used in the pT-equilibrium model.

- `ptgalpha_eps` Specifies the tolerance used for the Newton Solvers used in the pTg-equilibrium model.

## Enumerations

Expand Down
6 changes: 6 additions & 0 deletions src/common/m_derived_types.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ module m_derived_types
real(kind(0d0)), dimension(num_fluids_max) :: alpha
real(kind(0d0)) :: gamma
real(kind(0d0)) :: pi_inf !<
real(kind(0d0)) :: cv !<
JRChreim marked this conversation as resolved.
Show resolved Hide resolved
real(kind(0d0)) :: qv !<
real(kind(0d0)) :: qvp !<


!! Primitive variables associated with the patch. In order, these include
Expand All @@ -178,6 +181,9 @@ module m_derived_types
real(kind(0d0)) :: gamma !< Sp. heat ratio
real(kind(0d0)) :: pi_inf !< Liquid stiffness
real(kind(0d0)), dimension(2) :: Re !< Reynolds number
REAL(KIND(0d0)) :: cv !< heat capacity
REAL(KIND(0d0)) :: qv !< reference energy per unit mass for SGEOS, q (see Le Metayer (2004))
REAL(KIND(0d0)) :: qvp !< reference entropy per unit mass for SGEOS, q' (see Le Metayer (2004))
real(kind(0d0)) :: mul0 !< Bubble viscosity
real(kind(0d0)) :: ss !< Bubble surface tension
real(kind(0d0)) :: pv !< Bubble vapour pressure
Expand Down
Loading
Loading