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

Hyperelastic RMT code with updated modular precision #767

Open
wants to merge 551 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
551 commits
Select commit Hold shift + click to select a range
a6143c6
merged hypo_hllc and hyperelasticity, compiles, test suite fails
mrodrig6 Jul 1, 2024
b4b88ef
passes test suite
mrodrig6 Jul 1, 2024
25db322
reverted phase change to test suite
mrodrig6 Jul 1, 2024
dd87c40
removed unnecessary variables
mrodrig6 Jul 1, 2024
cff59ea
passed test suite, debugging RMT
mrodrig6 Jul 1, 2024
e3e4276
altered checkers for hypo, allowing hllc and 6-eq model combos, and a…
mcarcana Jul 1, 2024
458d440
Merge branch 'MFlowCode:master' into source
mrodrig6 Jul 2, 2024
7efc99f
Merge branch 'MFlowCode:master' into source
mrodrig6 Jul 2, 2024
cec56f7
added changes to compile on GPUs for m_variables_conversion
mrodrig6 Jul 2, 2024
af5ba53
merged with source
mrodrig6 Jul 2, 2024
b264c46
merged with master and source
mrodrig6 Jul 2, 2024
c3656d6
reverted phase change to pass test suite
mrodrig6 Jul 2, 2024
a4fe571
merged with master, test suite works on CPUs
mrodrig6 Jul 3, 2024
9ee25a2
merged with updated master
mrodrig6 Jul 3, 2024
1f3d126
Merge branch 'MFlowCode:master' into source
mrodrig6 Jul 3, 2024
98d563e
merged with master
mrodrig6 Jul 3, 2024
3794013
merged hllc_hypo
mrodrig6 Jul 3, 2024
706abd5
merged with hllc_hypo, not tested
mrodrig6 Jul 3, 2024
49906ec
modified GPU code back to the direct OpenACC
mrodrig6 Jul 3, 2024
a4e6da2
cleaned up differences between master, testing on Delta GPUs, compiles
mrodrig6 Jul 3, 2024
b55fdb7
merged with master
mrodrig6 Jul 3, 2024
f871132
removed excess code in inline conversions
mrodrig6 Jul 3, 2024
1b31888
merged with hllc_hypo
mrodrig6 Jul 3, 2024
12bb983
code compiles and passes test suite on Delta GPUs
mrodrig6 Jul 3, 2024
927b3c5
added OpenACC commands in model_eqns=3 for hllc in preparation for hy…
mrodrig6 Jul 3, 2024
bfd3fc1
added elastic energy to hllc for 6-equation model
mrodrig6 Jul 3, 2024
3b34a18
added more detail for the HLLC Riemann solver with 6-equation model
mrodrig6 Jul 3, 2024
262019b
ported the mass and volume fraction equations in Riemann HLLC for 6-e…
mrodrig6 Jul 3, 2024
65538eb
added the momentum flux from HLLC 5-equations to HLLC 6-equations, mo…
mrodrig6 Jul 3, 2024
a5899e0
modified the energy flux for the HLLC 5-equation model including hypo
mrodrig6 Jul 3, 2024
e8de636
added the surface tension to HLLC 6-equation without the if statements
mrodrig6 Jul 4, 2024
e823d6c
added the source terms fypp to HLLC 6-equations
mrodrig6 Jul 4, 2024
f1039ac
added the axisymmetric source term
mrodrig6 Jul 4, 2024
95869b8
added internal energies fluxes, finished HLLC 6-equation with hypo co…
mrodrig6 Jul 4, 2024
05dd990
fixed OpenACC issues
mrodrig6 Jul 4, 2024
83d6eaf
testing more existing test cases using submit script
mrodrig6 Jul 5, 2024
876f570
Merge branch 'MFlowCode:master' into source
mrodrig6 Jul 5, 2024
ec4f0b1
fully added hypoelasticity to HLLC 5- and 6-equation models, streamli…
mrodrig6 Jul 5, 2024
584c1b2
added hyperelasticity speed to HLLC + 6-equation
mrodrig6 Jul 5, 2024
78d0a40
partially debugged HLLC implementation, hypo and riemann is working, …
mrodrig6 Jul 6, 2024
deba134
debugged HLLC + hypo + 6-equation, testing on Delta GPU
mrodrig6 Jul 6, 2024
0299298
added 3D ctr midterm test case for simulations
mrodrig6 Jul 6, 2024
b1d02af
added CTR test case for midterm review
mrodrig6 Jul 7, 2024
66a25ac
formatted code
mrodrig6 Jul 7, 2024
cf9fd2b
debugged ACC syncronization issue, working HLLC+hypo+6eq
mrodrig6 Jul 7, 2024
4d14ae8
retesting for the synchronization error, compiles and passes test suite
mrodrig6 Jul 7, 2024
7b6656e
HLLC + hypo + 6equation, operational
mrodrig6 Jul 7, 2024
c9a7f11
rearranging the btensor calculation
mrodrig6 Jul 9, 2024
0ea271d
CTR midterm working code
mrodrig6 Jul 9, 2024
282f856
merged code with Delta
mrodrig6 Jul 9, 2024
8f6c7cb
Merge branch 'MFlowCode:master' into source
mrodrig6 Jul 9, 2024
2f30581
moved code around
mrodrig6 Jul 10, 2024
07563ac
added additional changes in preparation for merger
mrodrig6 Jul 10, 2024
a1dc73b
Merge branch 'hyperelasticity' of https://github.com/ComputationalFlo…
mrodrig6 Jul 10, 2024
8f8655b
made necessary changes to streamline code, compiles on CPUs, not tested
mrodrig6 Jul 10, 2024
5b04d7d
cleaned up code in conservative to primitive variables, more changes …
mrodrig6 Jul 10, 2024
bfb2752
test suite passes on CPUs, testing GPUs
mrodrig6 Jul 10, 2024
ebb1d2e
refactoring hyperelasticity mostly complete, not yet testing, compile…
mrodrig6 Jul 11, 2024
c7ffbd1
code compiles and passes test suite on Delta GPUs
mrodrig6 Jul 11, 2024
0ad7688
reworked \tau evaluation in the common code for hyperelasticity, comp…
mrodrig6 Jul 11, 2024
62b7f56
debugged pre and post-process on CPUs, testing on GPUs
mrodrig6 Jul 12, 2024
04564ec
debugged pre and post_process, now investigating btensor calc and cau…
mrodrig6 Jul 12, 2024
f001949
debugged issue for the cauchy tensor update
mrodrig6 Jul 12, 2024
81a3ae7
last check of the code, before moving xi calcs to simulation and out …
mrodrig6 Jul 14, 2024
b1556d8
hypoelasticity can now do grid stretching, building up hyper to do th…
mrodrig6 Jul 14, 2024
2f30499
improved hypo for acc and fixed shear modulus limit
mrodrig6 Jul 14, 2024
7491445
data issue, checking on Oscar
mrodrig6 Jul 15, 2024
b9c0102
fixed the ACC commands for grid stretching of hypo
mrodrig6 Jul 15, 2024
d223e41
merging RMT code into hyperelastic module in simulation, not yet done…
mrodrig6 Jul 15, 2024
c4779cb
upgraded RMT hyperelastic code, need to integrate to m_rhs
mrodrig6 Jul 15, 2024
c921cdd
debugged hyper for grid stretching, improved ACC looping for hypo
mrodrig6 Jul 15, 2024
481702e
hypo passes test suite on Delta GPU, phase change tolerance could be …
mrodrig6 Jul 15, 2024
9933f80
fixed hyperelastic stress update call, one more hyper bug remains
mrodrig6 Jul 15, 2024
8476ff5
additional modifications for RMT
mrodrig6 Jul 16, 2024
a2fd00f
code compiles, passes test suite, hyperelastic RMT runs
mrodrig6 Jul 16, 2024
124bd73
oscar commit
mrodrig6 Jul 16, 2024
1a9426c
merged conflicts
mrodrig6 Jul 16, 2024
e53b728
fixed incorrect flux calculation of the xi_field in the Riemann solve…
mrodrig6 Jul 16, 2024
8382a70
additional clean up for the RMT code
mrodrig6 Jul 16, 2024
91b6a66
added symmetry boundary conditions for the \xi field, other boundary …
mrodrig6 Jul 16, 2024
e6e2c6a
corrected stress values
mrodrig6 Jul 16, 2024
f248fe0
Merge branch 'MFlowCode:master' into source
mrodrig6 Jul 16, 2024
9aa316e
hard coded the boundaries for RMT, need to fix with for cbc in RMT
mrodrig6 Jul 17, 2024
9cb3a52
improved the abstract interface for hyperelastict
mrodrig6 Jul 17, 2024
cdf9923
fixed private variables in HLLC Riemann solver for xi_field_L/R
mrodrig6 Jul 17, 2024
6eca956
additional fixes to hyperelastic, compiles, passes test suites, testi…
mrodrig6 Jul 17, 2024
f607c5f
night before rehearsal at CTR, code testing
mrodrig6 Jul 18, 2024
8c9e058
last submit used at CTR summer program
mrodrig6 Jul 28, 2024
bd1427c
Merge branch 'MFlowCode:master' into source
mrodrig6 Jul 28, 2024
5a91fbd
merged with source
mrodrig6 Jul 28, 2024
779e3d4
Merge branch 'hyperelasticity'
mrodrig6 Jul 28, 2024
a1bfdea
merged with source
mrodrig6 Jul 28, 2024
24c2566
reverted phase change tolerances
mrodrig6 Jul 28, 2024
bab53da
Merge branch 'master' of https://github.com/ComputationalFlowGroup/MFC
mrodrig6 Jul 28, 2024
33d820d
added hyper_model capability
mrodrig6 Jul 28, 2024
6cd9f73
Merge branch 'master' of https://github.com/ComputationalFlowGroup/MFC
mrodrig6 Jul 28, 2024
5aac868
Merge branch 'MFlowCode:master' into source
mrodrig6 Jul 29, 2024
c79f291
Merge branch 'MFlowCode:master' into source
mrodrig6 Jul 30, 2024
fa63b57
merged with source
mrodrig6 Jul 30, 2024
2246408
commiting changes in 2d hardcoded ic
Jul 30, 2024
c614634
resolved
Jul 30, 2024
ceb5bb9
Merge branch 'MFlowCode:master' into source
mrodrig6 Jul 31, 2024
80f462f
Merge branch 'source'
mrodrig6 Jul 31, 2024
7445aab
2D capability for interface outputting
sawyer-rem Jul 31, 2024
e55983e
Merge branch 'master' of https://github.com/ComputationalFlowGroup/MFC
Jul 31, 2024
0186c5f
added checkers for current elasticity capabilities, have not addresse…
mcarcana Jul 31, 2024
0c41214
Merge branch 'MFlowCode:master' into source
mcarcana Jul 31, 2024
bc999b5
updating 5-eq hllc riemann, not yet done
mrodrig6 Aug 1, 2024
2a45410
Merge branch 'MFlowCode:master' into source
mrodrig6 Aug 1, 2024
7c16cc2
Merge branch 'master' of https://github.com/ComputationalFlowGroup/MFC
Aug 1, 2024
efe8914
updated 3Dhardcodedic to include the lung problem geometry
Aug 1, 2024
60a6046
Merge branch 'MFlowCode:master' into source
mrodrig6 Aug 4, 2024
17d20e2
beginning the debugging of the master branch
mrodrig6 Aug 5, 2024
f93b981
Merge branch 'master' of https://github.com/ComputationalFlowGroup/MFC
mrodrig6 Aug 5, 2024
570639a
1D and 2D passes suite, 3D fails
mrodrig6 Aug 5, 2024
4b02bd7
removing diff.txt file
mrodrig6 Aug 5, 2024
2c9bd2c
small changes, still not passing 3D
mrodrig6 Aug 5, 2024
d287461
removed diff.txt
mrodrig6 Aug 5, 2024
0d9e4e7
attempting to fix hllc for 3D
mrodrig6 Aug 5, 2024
378f7f2
working code, cleaning up the code
mrodrig6 Aug 6, 2024
2445604
code passes test suite, hyper should be checked
mrodrig6 Aug 6, 2024
f37d3ed
5-eq HLLC with hyperelasticity, passes test suite on Delta
mrodrig6 Aug 6, 2024
fd537f9
add examples cases from CTR to the examples folder
mrodrig6 Aug 6, 2024
a8cbfff
a few modifications to 3D hyperelasticity module
mrodrig6 Aug 6, 2024
ae75475
removed 3D_CAV simulation
mrodrig6 Aug 6, 2024
64424f1
3d lung case file added
Aug 6, 2024
f7c18f9
Merge branch 'master' of https://github.com/ComputationalFlowGroup/MFC
Aug 6, 2024
38540b6
Adding 3d_bubble_channel
Aug 6, 2024
684f4b3
Adding 3d_bubble_channel example
Aug 6, 2024
31520ec
adding 3D_bubble_channel
Aug 6, 2024
2a4388a
resolved a few issues for the lung wave problem
mrodrig6 Aug 6, 2024
f1717b5
Merge branch 'master' of https://github.com/ComputationalFlowGroup/MFC
mrodrig6 Aug 6, 2024
02adf9e
added some files
mrodrig6 Aug 6, 2024
40ff12b
testing bubble in channel
mrodrig6 Aug 6, 2024
7113d29
improving hyperelasticity
mrodrig6 Aug 7, 2024
2bdd25a
small changes to the submit scripts
mrodrig6 Aug 7, 2024
a0f6eae
Merge branch 'MFlowCode:master' into source
mrodrig6 Aug 7, 2024
a76202a
Merge branch 'MFlowCode:master' into source
mrodrig6 Aug 9, 2024
10424f4
Merge branch 'source'
mrodrig6 Aug 10, 2024
2e969a2
a few additional changes
mrodrig6 Aug 10, 2024
5472a04
Merge branch 'master' of https://github.com/ComputationalFlowGroup/MFC
mrodrig6 Aug 10, 2024
17d5541
updated the m_variables_conversion
mrodrig6 Aug 10, 2024
1dcd10d
Merge branch 'MFlowCode:master' into source
mrodrig6 Aug 12, 2024
69de443
Merge branch 'source'
mrodrig6 Aug 12, 2024
9898d6b
Merge branch 'MFlowCode:master' into source
mrodrig6 Aug 13, 2024
265b4d1
Merge branch 'MFlowCode:master' into source
mrodrig6 Aug 14, 2024
9e57b4e
merged changes
mrodrig6 Aug 14, 2024
3f2659d
Merge branch 'MFlowCode:master' into source
mrodrig6 Aug 18, 2024
0b58a52
metaprogramming to hyperelastic
mrodrig6 Aug 20, 2024
bd406db
added a few more metaprogramming
mrodrig6 Aug 21, 2024
bfd14bf
Merge branch 'MFlowCode:master' into source
mrodrig6 Aug 23, 2024
c61f36f
Merge branch 'MFlowCode:master' into source
mrodrig6 Aug 25, 2024
be6e91e
Merge branch 'MFlowCode:master' into source
mrodrig6 Aug 28, 2024
e51bde2
Merge branch 'MFlowCode:master' into source
mrodrig6 Aug 29, 2024
6f200c0
Merge branch 'MFlowCode:master' into source
mrodrig6 Sep 5, 2024
4ceaefb
Merge branch 'MFlowCode:master' into source
mrodrig6 Sep 7, 2024
6d60ecd
merged with source, need to update module load for Delta
mrodrig6 Sep 8, 2024
3d84962
updated the Delta modules
mrodrig6 Sep 8, 2024
a8eeab0
added modules to Delta
mrodrig6 Sep 8, 2024
3683854
Merge branch 'source'
mrodrig6 Sep 8, 2024
fd01d5f
Merge branch 'MFlowCode:master' into source
mrodrig6 Sep 9, 2024
181db14
Merge branch 'MFlowCode:master' into source
mrodrig6 Sep 23, 2024
1e424e0
update the library in the mako file
mrodrig6 Oct 6, 2024
e230cd0
Merge branch 'MFlowCode:master' into source
mrodrig6 Oct 6, 2024
972a58a
Merge branch 'source' of https://github.com/ComputationalFlowGroup/MF…
mrodrig6 Oct 6, 2024
e101761
merged with source and updated mako file
mrodrig6 Oct 7, 2024
60f9226
updated input file in the lung problem, updated 3dhardcodedIC
Oct 17, 2024
6ab5f91
Update case.py
nkoval2003 Oct 29, 2024
db99be8
added 2 print statements in the m_hyper
Oct 31, 2024
17e8a19
Update case.py
nkoval2003 Oct 31, 2024
d122b2e
adding small fixes to the code to improve the lung problem for APS DFD
mrodrig6 Nov 7, 2024
eb799b7
adding the zero gradient boundary conditions
mrodrig6 Nov 11, 2024
03f320e
Merge branch 'MFlowCode:master' into source_new
mrodrig6 Nov 12, 2024
479de27
code compiles after merger with source, needs to be tested
mrodrig6 Nov 12, 2024
c9c3ee1
removing old speed of sound, there may older code that also needs to …
mrodrig6 Nov 12, 2024
e853852
passes the test suite on Delta
mrodrig6 Nov 13, 2024
6339c43
Merge branch 'MFlowCode:master' into source
mrodrig6 Nov 13, 2024
7afc810
merged latest changes
mrodrig6 Nov 13, 2024
d9d5214
merged with master and source
mrodrig6 Nov 13, 2024
5da51af
still working on lung simulation
mrodrig6 Nov 13, 2024
9f019aa
Merge branch 'MFlowCode:master' into source
mrodrig6 Nov 14, 2024
86ae789
merged again with source
mrodrig6 Nov 14, 2024
bd14da3
Merge branch 'master' into lung
mrodrig6 Nov 14, 2024
53a0205
Merge branch 'MFlowCode:master' into source
mrodrig6 Nov 15, 2024
7570818
populate primitive variable buffer after hyperelasticity for stress i…
mcarcana Nov 18, 2024
a251fa2
adding von Mises stress routine + post_process to output
mcarcana Nov 18, 2024
939c639
von Mises compiles + fix of populate variable buffer in rhs for hyper…
mcarcana Nov 18, 2024
ef85e33
adding pre_stress hardcode patch
mcarcana Nov 19, 2024
24d1ff1
merged with master
mrodrig6 Nov 19, 2024
7312231
outline for kymograph: step 1 - kymograph flag added in post_process
mcarcana Nov 19, 2024
5e77aa2
Merge branch 'MFlowCode:master' into source
mrodrig6 Nov 19, 2024
432f915
step 2 - kymo_data_file outline
mcarcana Nov 19, 2024
1e2073c
merged conflicts
mrodrig6 Nov 19, 2024
0c9f354
code not compiling
mrodrig6 Nov 19, 2024
2bcee9e
fixed issues with von Mises calculation
mrodrig6 Nov 19, 2024
bc102c8
incremental step 2
mcarcana Nov 19, 2024
0047941
resolved namelist issue in post_process
mrodrig6 Nov 20, 2024
dc993e1
operational code for APS DFD 2024
mrodrig6 Nov 21, 2024
482149e
added the merger
mrodrig6 Nov 21, 2024
2bc57fb
debugged post_process
mrodrig6 Nov 22, 2024
a8abfed
step 3: extracting vonMises stress for selected 1D line in domain
mcarcana Nov 22, 2024
1a369de
one approach to saving d, h_1, h_2 von Mises stress
mcarcana Nov 22, 2024
1e3bd31
alternative to saving d, h_1, h_2 von Mises stress
mcarcana Nov 22, 2024
f2a9e0f
kymograph tentatively done, compiles, need to test next
mcarcana Nov 22, 2024
11860a6
issues in vonMises addressed
mcarcana Nov 23, 2024
efa9ca4
adjustments to vonMises
mcarcana Nov 23, 2024
e8d2b18
merging conflicts
mcarcana Nov 23, 2024
5b3fde7
kymograph in case_dicts
mcarcana Nov 23, 2024
40b456a
it runs but does it work?
mcarcana Nov 23, 2024
55d9ba9
added sbatch command to improve performance on Delta
mrodrig6 Dec 20, 2024
143f710
Merge branch 'MFlowCode:master' into source
mrodrig6 Dec 20, 2024
ed86832
initial larger merger with source, can not yet run the test suite, to…
mrodrig6 Dec 20, 2024
29c132e
Merge branch 'MFlowCode:master' into source
mrodrig6 Dec 20, 2024
ab4d388
merged with the source code, passed most of the test suite
mrodrig6 Dec 20, 2024
2da2257
Merge branch 'MFlowCode:master' into source
mrodrig6 Dec 21, 2024
4de6503
Merge branch 'source'
mrodrig6 Dec 21, 2024
1fafb74
updated a few files to conform to the modular precision
mrodrig6 Dec 21, 2024
fc3b249
added more module precision
mrodrig6 Dec 21, 2024
25bf4fe
cleaning up the master branch in preparation for PR
mrodrig6 Dec 21, 2024
ab772fd
ran the MFC format command for PR
mrodrig6 Dec 21, 2024
87430b6
resolved several comments
mrodrig6 Dec 21, 2024
5d28efd
fixed the lint issues
mrodrig6 Dec 21, 2024
c9ec48d
Merge branch 'master' into master
sbryngelson Dec 21, 2024
8bcf768
Discard changes to examples/2D_lungwave/case.py
sbryngelson Dec 21, 2024
4dacbea
Delete toolchain/bootstrap/docker.sh
sbryngelson Dec 21, 2024
f54f964
Discard changes to examples/2D_lungwave_horizontal/case.py
sbryngelson Dec 21, 2024
d5c4b74
Update modules
sbryngelson Dec 21, 2024
3ce911a
Discard changes to toolchain/modules
sbryngelson Dec 21, 2024
1839770
made elasticity the logical for hypo and hyper
mrodrig6 Dec 22, 2024
3c608c2
refined the checker common for the elasticity models
mrodrig6 Dec 22, 2024
8e92fe5
added elasticity as a mandatory flag to be added to the input file wh…
mrodrig6 Dec 23, 2024
5972e12
fix ups
sbryngelson Dec 23, 2024
509806c
one broken example for CI, one removed one
sbryngelson Dec 23, 2024
2a3e593
another bokren case!
sbryngelson Dec 23, 2024
27c4f96
Merge branch 'master' into master
sbryngelson Dec 23, 2024
49f2dcc
Merge branch 'master' of https://github.com/ComputationalFlowGroup/MFC
mrodrig6 Dec 23, 2024
a4feb61
RMT now with HLL, need to build test cases
mrodrig6 Dec 23, 2024
c227fbf
additional clean up for interface energy data
mrodrig6 Dec 23, 2024
a3fb923
added kymograph to post_processing
mrodrig6 Dec 24, 2024
f27b0df
Merge branch 'master' of https://github.com/ComputationalFlowGroup/MFC
mrodrig6 Dec 24, 2024
e080104
clean up of the code
mrodrig6 Dec 24, 2024
5f3adcb
fixing wp issues
mrodrig6 Dec 24, 2024
a3bffbd
added examples to be made tests after verifying
mrodrig6 Dec 24, 2024
1db6a0d
Merge branch 'master' into master
sbryngelson Dec 24, 2024
69a6015
added variables to mpi_proxy
mrodrig6 Dec 24, 2024
52d58d6
merged conflicts
mrodrig6 Dec 24, 2024
c7f4484
added boundary condition checker for hyperelasticity
mrodrig6 Dec 25, 2024
d3479b1
reverted the elasticity flag
mrodrig6 Dec 25, 2024
b7d6bdb
formatted code again
mrodrig6 Dec 25, 2024
c465891
fixed example files
mrodrig6 Dec 25, 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
384 changes: 384 additions & 0 deletions examples/3D_bubble_channel/case.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,384 @@
#!/usr/bin/env python3
import math, json

## 1 FOR BACKGROUND, 2 FOR BUBBLE, 3 FOR GEL
# Pressure [Pa]
p01 = 101325.
p02 = 101325
p03 = p01

# Temperature [K]
T01 = 298.15
T02 = 298.15
T03 = T01

#### FLUID PROPERTIES ####

### liquid water ###
# pi infty
piwl = 1.0E+09
# qv
qvwl = -1167000
# qv'
qvpwl = 0.0E0
# cv
cvwl = 1816
# cp
cpwl = 4267
# gamma
gamwl = cpwl / cvwl

## FOR PATCHES 1 & 2 ##

# density
rho0wl1 = (p01 + piwl)/((gamwl-1)*cvwl*T01)
rho0wl2 = (p02 + piwl)/((gamwl-1)*cvwl*T02)
rho0wl3 = (p03 + piwl)/((gamwl-1)*cvwl*T03)

# speed of sound FOR
c_wl1 = math.sqrt( gamwl * ( p01 + piwl ) / rho0wl1 )
c_wl2 = math.sqrt( gamwl * ( p02 + piwl ) / rho0wl2 )
c_wl3 = math.sqrt( gamwl * ( p03 + piwl ) / rho0wl3 )

# part for Gases - relations from IMR
Ru = 8.3144598 # Universal gas constant (J/mol-K)

### Vapor water ###
Rv = Ru/(18.01528e-3) # Gas constant for vapor (Ru/molecular weight) (J/kg-K)
# gamma
gamwv = 1.4
# cp
cpwv = Rv * gamwv/(gamwv-1)
# cv
cvwv = cpwv/gamwv
# pi infinity
piwv = 0.0E0
# qv
qvwv = 2030000
# qv'
qvpwv = -23400

## FOR PATCHES 1 & 2 ##

# density
rho0wv1 = (p01 + piwv)/((gamwv-1)*cvwv*T01)
rho0wv2 = (p02 + piwv)/((gamwv-1)*cvwv*T02)
rho0wv3 = (p03 + piwv)/((gamwv-1)*cvwv*T03)

# speed of sound
c_wv1 = math.sqrt( gamwv * ( p01 + piwv ) / rho0wv1 )
c_wv2 = math.sqrt( gamwv * ( p02 + piwv ) / rho0wv2 )
c_wv3 = math.sqrt( gamwv * ( p03 + piwv ) / rho0wv3 )

### Air ###

Ra = Ru/(28.966e-3) # Gas constant for air (Ru/molecular weight) (J/kg-K)
gamwa = 1.4
# cp
cpa = Ra * gamwa/(gamwa-1)
# cv
cva = cpa/gamwa
# pi infinity
pia = 0.0E0
# qv
qvwa = 0.0E0
# qv'
qvpwa = 0.0E0

## FOR PATCHES 1 & 2 ##

# density
rho0wa1 = (p01 + pia)/((gamwa-1)*cva*T01)
rho0wa2 = (p02 + pia)/((gamwa-1)*cva*T02)
rho0wa3 = (p03 + pia)/((gamwa-1)*cva*T03)

# Speed of sound
c_a1 = math.sqrt( gamwa * ( p01 + pia ) / rho0wa1 )
c_a2 = math.sqrt( gamwa * ( p02 + pia ) / rho0wa2 )
c_a3 = math.sqrt( gamwa * ( p03 + pia ) / rho0wa3 )

### 3% polyacrylamide gel ###

# gamma
gamwg = gamwl #2.35
# pi infty
pig = piwl #1.1754E+09
# qv
qvwg = qvwl #0.0E0
# qv'
qvpwg = qvpwl #0.0E0
# cv
cvg = cvwl
# cp
cpg = gamwg*cvg

## FOR PATCHES 1 & 2 & 3 ##

# density
rho0wg1 = (p01 + pig)/((gamwg-1)*cvg*T01)
rho0wg2 = (p02 + pig)/((gamwg-1)*cvg*T02)
rho0wg3 = (p03 + pig)/((gamwg-1)*cvg*T03)

# Speed of sound
c_g1 = math.sqrt( gamwg * ( p01 + pig ) / rho0wg1 )
c_g2 = math.sqrt( gamwg * ( p02 + pig ) / rho0wg2 )
c_g3 = math.sqrt( gamwg * ( p03 + pig ) / rho0wg3 )

## SHOCK RELATIONS
p02Op01 = p02 / p01

# Mach number of the shocked region - this should agree with Min, if everything is correct
Ms = math.sqrt( ( gamwa + 1. ) / ( 2. * gamwa ) * ( p02Op01 - 1. ) * ( p02 / ( p02 + pia ) ) + 1.0 )

# shock speed
ss = Ms * c_a1

### volume fractions for each of the patches ###
C0 = 0.25 # vapor concentration for IMR

# patch 1: liquid water
liq_wg = 0
liq_wa = 0*1.00E-15
liq_wv = 1.00E-9
liq_wl = 1.00E00 - liq_wv - liq_wa - liq_wg
# water vapor
vap_wl = 1.00E-9
vap_wv = 1 / ( ( 1 - C0 ) / C0 * rho0wv2 / rho0wa2 + 1 )
vap_wa = 0*1.00E-15
vap_wg = 0
vap_tot = vap_wl + vap_wv + vap_wa + vap_wg
# air
air_wl = 1.00E-15
air_wv = vap_tot
air_wg = 0
air_wa = 0*(1.00E00 - air_wl - air_wv - air_wg)
# bubble
bub_wl = 1.0E-9
bub_wv = 1.0-bub_wl
bub_wg = 0
bub_wa = 0*(1 - bub_wl - bub_wv - bub_wg)
# gel
gel_wl = 0
gel_wv = 0
gel_wa = 0
gel_wg = 1.00E00 - gel_wl - gel_wv - gel_wa

## Elasticity
Gl = 0
Gv = 0
Ga = 0
Gg = 0.57E+03

## SIMULATION PARAMETERS

# CFL

# Bubble Initial Radius
R0 = 50E-06

# number of elements
Nx = 249 #404 #249
Ny = 124 #179 #124
Nz = 124 #179 #124
Nx0 = Nx

# domain boundaries
lref = 2*R0
xb = -lref
xe = lref

yb = 0.00
ye = 2*lref

zb = 0.00
ze = 2*lref

lenx = ( xe - xb )
leny = ( ye - yb )
lenz = ( ze - zb )

xcenl = 0.
ycenl = leny/2.
zcenl = lenz/2.

#xdist = 6.51E-10 #2.17E-5
#sod = xdist/R0
sod = 0
xcenb = sod*R0 #neg for bub in liq; pos bub in gel
ycenb = 0.00
zcenb = 0.00

xceng = xe / 2.
yceng = ycenl
zceng = zcenl

# typical cell size
dx = ( xe - xb ) / Nx
dy = ( ye - yb ) / Ny
dz = ( ze - zb ) / Nz
#print(dx)
PPBR_x = R0 / dx
PPBR_y = R0 / dy
PPBR_z = R0 / dz
#print(PPBR_x)
#print(PPBR_y)

# save frequency = SF + 1 (because the initial state, 0.dat, is also saved)
SF = 100

# Critical time-step
tc = 0.915 * R0 * math.sqrt( rho0wl1 / p01 )

# making Nt divisible by SF
# tendA = 1.5 * tc
tend = 1.2 * tc

# 1 - ensure NtA is sufficient to go a little beyond tendA
# NtA = int( tendA // dt + 1 )

# Array of saves. it is the same as Nt/Sf = t_step_save
# AS = int( NtA // SF + 1 )

# Nt = total number of steps. Ensure Nt > NtA (so the total tendA is covered)
# Nt = AS * SF
#Nt = int(2.5E3 * tend // tc * Nx / Nx0 + 1)
Nt = int(1E6 * tend // tc * Nx / Nx0 + 1)
#print(Nt)
dt = tend / Nt

AS = int( Nt//SF )
tstart = 0#2184
# Total physical time
# tend = Nt * dt

# Configuring case dictionary ==================================================
print(json.dumps({
# Logistics ================================================
'run_time_info': 'T',
# ==========================================================
# Computational Domain Parameters ==========================
'x_domain%beg' : xb,
'x_domain%end' : xe,
'y_domain%beg' : yb,
'y_domain%end' : ye,
'z_domain%beg' : zb,
'z_domain%end' : ze,
'stretch_x' : 'F',
'loops_x' : 1,
'a_x' : 4.0E0,
'x_a' : -1.75*R0*(abs(sod)+1),
'x_b' : 5*R0,
'stretch_y' : 'F',
'loops_y' : 2,
'a_y' : 4.0E0,
'y_a' : -2*R0*abs(sod),
'y_b' : 2*R0*abs(sod),
'stretch_z' : 'F',
'loops_z' : 2,
'a_z' : 4.0E0,
'z_a' : -2*R0*abs(sod),
'z_b' : 2*R0*abs(sod),
'cyl_coord' : 'F',
'm' : Nx,
'n' : Ny,
'p' : Nz,
'dt' : dt,
't_step_start' : tstart,
't_step_stop' : Nt,
't_step_save' : 1,
# ==========================================================
# Simulation Algorithm Parameters ==========================
'num_patches' : 2,
'model_eqns' : 3,
'num_fluids' : 2,
#'alt_soundspeed' : 'T',
#'hypoelasticity' : 'F',
#'hyperelasticity' : 'F',
'mpp_lim' : 'T',
'mixture_err' : 'T',
#'relax' : 'T',
#'relax_model' : 6,
#'palpha_eps' : 1.0E-6,
#'ptgalpha_eps' : 1.0E-2,
'time_stepper' : 3,
'weno_order' : 5,
'weno_eps' : 1.0E-16,
'weno_Re_flux' : 'F',
'weno_avg' : 'F',
'mapped_weno' : 'F',
'null_weights' : 'F',
'mp_weno' : 'T',
'riemann_solver' : 2,
'wave_speeds' : 1,
'avg_state' : 2,
'bc_x%beg' : -16, #-2,
'bc_x%end' : -16,
'bc_y%beg' : -2,
'bc_y%end' : -6,
'bc_z%beg' : -2,
'bc_z%end' : -6,
# ==========================================================
# Formatted Database Files Structure Parameters ============
'format' : 1,
'precision' : 2,
'prim_vars_wrt':'T',
'parallel_io' :'T',
'probe_wrt' :'T',
'fd_order' : 1,
'num_probes' : 1,
'probe(1)%x' : 0.,
'probe(1)%y' : 0.,
'probe(1)%z' : 0.,
# ==========================================================
# Patch 1: High pressured water ============================
# Specify the cubic water background grid geometry
'patch_icpp(1)%geometry' : 9,
'patch_icpp(1)%x_centroid' : 20*xcenl,
'patch_icpp(1)%y_centroid' : 20*ycenl,
'patch_icpp(1)%z_centroid' : 20*zcenl,
'patch_icpp(1)%length_x' : 20*lenx,
'patch_icpp(1)%length_y' : 20*leny,
'patch_icpp(1)%length_z' : 20*lenz,
'patch_icpp(1)%vel(1)' : 0.0E+00,
'patch_icpp(1)%vel(2)' : 0.0E+00,
'patch_icpp(1)%vel(3)' : 0.0E+00,
'patch_icpp(1)%pres' : p01,
'patch_icpp(1)%alpha_rho(1)' : liq_wl * rho0wl1,
'patch_icpp(1)%alpha_rho(2)' : liq_wv * rho0wv1,
'patch_icpp(1)%alpha(1)' : liq_wl,
'patch_icpp(1)%alpha(2)' : liq_wv,
# ==========================================================
# Patch 2: (Vapor) Bubble ==================================
'patch_icpp(2)%geometry' : 8,
'patch_icpp(2)%x_centroid' : xcenb,
'patch_icpp(2)%y_centroid' : ycenb,
'patch_icpp(2)%z_centroid' : zcenb,
'patch_icpp(2)%radius' : R0,
'patch_icpp(2)%smoothen' : 'T',
'patch_icpp(2)%smooth_patch_id': 1,
'patch_icpp(2)%smooth_coeff' : 0.5E+00,
'patch_icpp(2)%vel(1)' : 0.0E+00,
'patch_icpp(2)%vel(2)' : 0.0E+00,
'patch_icpp(2)%vel(3)' : 0.0E+00,
'patch_icpp(2)%pres' : p02,
'patch_icpp(2)%alpha_rho(1)' : bub_wl*rho0wl2,
'patch_icpp(2)%alpha_rho(2)' : bub_wv*rho0wv2,
'patch_icpp(2)%alpha(1)' : bub_wl,
'patch_icpp(2)%alpha(2)' : bub_wv,
'patch_icpp(2)%alter_patch(1)' : 'T',
# ==========================================================
# Fluids Physical Parameters ===============================
'fluid_pp(1)%gamma' : 1.0E+00 / ( gamwl - 1 ),
'fluid_pp(1)%pi_inf' : gamwl * piwl / ( gamwl - 1 ),
'fluid_pp(1)%cv' : cvwl,
'fluid_pp(1)%qv' : qvwl,
'fluid_pp(1)%qvp' : qvpwl,
#'fluid_pp(1)%G' : Gl,
'fluid_pp(2)%gamma' : 1.0E+00 / ( gamwv - 1 ),
'fluid_pp(2)%pi_inf' : gamwv * piwv / ( gamwv - 1 ),
'fluid_pp(2)%cv' : cvwv,
'fluid_pp(2)%qv' : qvwv,
'fluid_pp(2)%qvp' : qvpwv,
#'fluid_pp(2)%G' : Gv,
# ==========================================================
}))
Loading
Loading