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

Hypoelasticity to HLLC, preliminary features for RMT (update) #727

Merged
merged 512 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
512 commits
Select commit Hold shift + click to select a range
db9a56f
merged with master and source
mrodrig6 Jun 22, 2024
9674fcc
merged changes, not yet checked compilation
mrodrig6 Jun 26, 2024
e4f04b7
Merge branch 'MFlowCode:master' into source
mrodrig6 Jun 26, 2024
5fc9d9c
still trying compilation
mrodrig6 Jun 26, 2024
9e98b59
merged changes to master
mrodrig6 Jun 26, 2024
63ad273
merged changes with source, cleaned up lung additions that were not n…
mrodrig6 Jun 26, 2024
d8a8497
Merge branch 'master' of https://github.com/ComputationalFlowGroup/MFC
mrodrig6 Jun 26, 2024
482d3fb
merged with master and resolved conflicts, compiles on Oscar, has not…
mrodrig6 Jun 26, 2024
4ec47a0
merged with the latest version of master
mrodrig6 Jun 26, 2024
141aa54
merged code with Delta and compiles
mrodrig6 Jun 27, 2024
494238f
debugging the code significantly
mrodrig6 Jun 27, 2024
c808065
fixing global parameters
mrodrig6 Jun 27, 2024
be469bb
debugged the hypoelasticity riemann issue, compiles, passes test suit…
mrodrig6 Jun 27, 2024
67efa55
added more changes to the code, still testing
mrodrig6 Jun 28, 2024
a8fd46c
added some small changes to the code towards tesing
mrodrig6 Jun 28, 2024
bc06676
small change
mrodrig6 Jun 28, 2024
fe6c7ee
Merge branch 'hyperelasticity' of https://github.com/ComputationalFlo…
mrodrig6 Jun 28, 2024
e90802a
fixed issue in inline Riemann function, compiles and passes tests
mrodrig6 Jun 28, 2024
8607cc9
Removed G contribution to speed of sound, needs debugging
Jun 28, 2024
1f12074
merging conflicts
Jun 28, 2024
688be39
fixed compilation issue
sawyer-rem Jun 28, 2024
2b74034
made changes for GPUs, untested
mrodrig6 Jun 28, 2024
b7dc74e
unworking code
mrodrig6 Jun 28, 2024
0127682
code runs on Oscar CPUs and Delta GPUs
mrodrig6 Jun 28, 2024
e9b7412
added input file and testing hyperelasticity
mrodrig6 Jun 29, 2024
cce7fc7
code works and is tested on Delta GPUs
mrodrig6 Jun 29, 2024
9afec0f
reverting some changes to the workflow
mrodrig6 Jun 29, 2024
09d2172
lowered relative error in the phase change routines, added examples f…
mrodrig6 Jun 29, 2024
6ccb9f4
added changes for phase change
mrodrig6 Jun 29, 2024
79e22a8
commented hypo + model-eqs checker in preprocess to test hypo with 6-…
mcarcana Jun 29, 2024
1fe9a58
Merge branch 'master' into hllc_hypo
mcarcana Jun 29, 2024
add3937
Merge branch 'MFlowCode:master' into source
mrodrig6 Jun 30, 2024
283a209
still debugging hyperelasticity branch
mrodrig6 Jun 30, 2024
22efac8
merged conflicts from source
mrodrig6 Jun 30, 2024
ed8d06d
merged with master and source
mrodrig6 Jun 30, 2024
1c3b973
Merge branch 'hllc_hypo' of https://github.com/ComputationalFlowGroup…
mrodrig6 Jun 30, 2024
236cac5
merged conflicts with master, still debugging hyper
mrodrig6 Jun 30, 2024
f2c55b3
fixed Oscar module issue, rebuilding hyper back into MFC, compiles
mrodrig6 Jul 1, 2024
bb80b5a
preparing for merger with hllc_hypo, code compiles, passes tests and …
mrodrig6 Jul 1, 2024
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
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
114366d
deleted scripts
mrodrig6 Nov 15, 2024
2dad861
Merge branch 'master' into prcode
mrodrig6 Nov 15, 2024
09e3abd
remove global allocate and deallocate
wilfonba Nov 18, 2024
9b782f8
Merge branch 'master' into prcode
wilfonba Nov 18, 2024
152cb7b
address most requests for changes
wilfonba Nov 18, 2024
c1d1a9c
Merge branch 'prcode' of github.com:ComputationalFlowGroup/MFC into p…
wilfonba Nov 18, 2024
db6c04f
fix post_process build
wilfonba Nov 18, 2024
6413886
fix noMPI bug
sbryngelson Nov 19, 2024
d171425
mpi common
sbryngelson Nov 19, 2024
d308c97
fix examples
wilfonba Nov 25, 2024
61e7221
fix more case files
wilfonba Nov 25, 2024
6e1a155
updates
wilfonba Nov 25, 2024
7ff7dfd
Merge branch 'master' into prcode
sbryngelson Nov 26, 2024
1f079a1
fix frontier
wilfonba Nov 30, 2024
efc99c8
Merge branch 'master' into prcode
wilfonba Nov 30, 2024
3d11ead
fix merge bug
wilfonba Nov 30, 2024
1fb4f94
fix benchmarking
wilfonba Nov 30, 2024
0124304
Merge remote-tracking branch 'upstream/master' into prcode
wilfonba Dec 1, 2024
b6e656e
Merge branch 'prcode' of github.com:ComputationalFlowGroup/MFC into p…
wilfonba Dec 1, 2024
9bf79fd
Merge remote-tracking branch 'upstream/master' into prcode
wilfonba Dec 8, 2024
75e27e2
update intel compilers for CI
wilfonba Dec 8, 2024
f9144fb
fix intel and add doxygen
wilfonba Dec 8, 2024
03d01d6
change intel version
wilfonba Dec 8, 2024
fb50859
change intel versions again and format
wilfonba Dec 8, 2024
bd7067a
add git blame
wilfonba Dec 8, 2024
17278fb
fix a bunch of examples
wilfonba Dec 8, 2024
a518ddc
remove print
wilfonba Dec 8, 2024
ac5150d
Merge branch 'master' into prcode
sbryngelson Dec 15, 2024
3641a89
Merge branch 'master' into prcode
sbryngelson Dec 15, 2024
eb00b84
Merge branch 'master' into prcode
sbryngelson Dec 15, 2024
052b161
fixes from Anand
sbryngelson Dec 16, 2024
23822da
Merge branch 'master' into prcode
sbryngelson Dec 16, 2024
a27f4cf
cleanup
sbryngelson Dec 16, 2024
45e80d9
better
sbryngelson Dec 16, 2024
1864285
working precision
sbryngelson Dec 16, 2024
0367776
fix
sbryngelson Dec 16, 2024
74eea4e
fix
sbryngelson Dec 16, 2024
b9ceb0f
fix intel junk
sbryngelson Dec 17, 2024
09b8fb7
Merge branch 'master' into prcode
sbryngelson Dec 18, 2024
f152e85
Merge branch 'master' into prcode
sbryngelson Dec 19, 2024
c0a9a69
fixup
sbryngelson Dec 19, 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
193 changes: 193 additions & 0 deletions examples/2D_lungwave/case.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
#!/usr/bin/env python3

import math
import json

pi = 3.141592653589
# material parameters

#material1 :: gas
#patterson 2018

gammag = 1.4 #unitless
Bg =0 #pascals
rhog = 1.18 #kg/m^3
c_g = 347.2 #m/s
G_g = 0 #pa

#material2 :: lung

gammal = 5.5
Bl = 492.E+06
rhol = 996.0
c_l = 1648.7
G_l = 1E3

#primitive vartiables
patmos = 101325. #pa

#problem specific variable
lambda_wave = 1E-3

#define pulse
P_amp = 10.E+6
P_len = 45 #length of the impulse
theta = -math.pi/2 #direction of propagation

#non-dim

#define characteristic density, length, time, stress material
rho_char = rhog
length_char = lambda_wave
c_char = c_g
time_char = length_char/c_char
stress_char = rho_char*c_char*c_char/gammag

#non-dim the properties
rhog_n = rhog/rho_char
c_g_n = c_g/c_char
rhol_n = rhol/rho_char
c_l_n = c_l/c_char
Bg_n = Bg/stress_char
Bl_n = Bl/stress_char
G_g_n = G_g/stress_char
G_l_n = G_l/stress_char
patmos_n = patmos/stress_char
P_amp_n = P_amp/stress_char

#geometry
dlengx = 1.
dlengy = 20.
Nx = 200
Ny = dlengy*Nx
dx = dlengx/Nx
dy = dlengy/Ny
alphal_back = 1.0
alphag_back = 0.0
alphal_lung = 0.0
alphag_lung = 1.0

interface_amp = 0.5

# time stepping requirements
time_end = 2.5
cfl = 0.5

dt = cfl * dx/c_l
Nt = int(time_end/dt)
Nframes = 50000
tstart = 0
tstop = Nt
tsave = int(Nt/Nframes)

#interface profile
interface_amp = 0.5

# Configuring case dictionary
print(json.dumps({
# Logistics ================================================================
'run_time_info' : 'T',
# ==========================================================================

# Computational Domain Parameters ==========================================
'x_domain%beg' : 0.,
'x_domain%end' : dlengx,
'y_domain%beg' : -dlengy/2.,
'y_domain%end' : dlengy/2.,
'm' : int(Nx),
'n' : int(Ny),
'p' : 0,
'dt' : dt,
't_step_start' : tstart,
't_step_stop' : tstop,
't_step_save' : tsave,
# ==========================================================================

# Simulation Algorithm Parameters ==========================================
'num_patches' : 2,
'model_eqns' : 2,
'alt_soundspeed' : 'F',
'num_fluids' : 2,
'adv_alphan' : 'T',
'mpp_lim' : 'T',
'mixture_err' : 'T',
'time_stepper' : 3,
'weno_order' : 5,
'weno_eps' : 1.E-16,
'weno_Re_flux' : 'F',
'weno_avg' : 'F',
'mapped_weno' : 'T',
'null_weights' : 'F',
'mp_weno' : 'T',
'riemann_solver' : 2,
'wave_speeds' : 1,
'avg_state' : 2,
'bc_x%beg' : -1,
'bc_x%end' : -1,
'bc_y%beg' : -6,
'bc_y%end' : -6,
# ==========================================================================

# Formatted Database Files Structure Parameters ============================
'format' : 1,
'precision' : 2,
'prim_vars_wrt' :'T',
'parallel_io' :'T',
# ==========================================================================

# Monopole setting =========================================================
'Monopole' : 'T', # creating an acoustic wave
'num_mono' : 1, # place in the middle and expand
'Mono(1)%pulse' : 3, # sine wave
'Mono(1)%npulse' : 1, # 1 pulse
'Mono(1)%mag' : 10.0*patmos_n, # magnitude
'Mono(1)%length' : 1*dlengx, # impulse length
'Mono(1)%loc(1)' : dlengx/2, # x_center of the domain
'Mono(1)%loc(2)' : 5.0*dlengx, # upper boundary of the domain
'Mono(1)%dir' : -math.pi/2, # direction: -pi/2
#==============================================================================

# Patch 1: Background ======================================================
'patch_icpp(1)%geometry' : 3,
'patch_icpp(1)%x_centroid' : dlengx/2,
'patch_icpp(1)%y_centroid' : 0.,
'patch_icpp(1)%length_x' : dlengx,
'patch_icpp(1)%length_y' : dlengy,
'patch_icpp(1)%vel(1)' : 0.,
'patch_icpp(1)%vel(2)' : 0.E+00,
'patch_icpp(1)%pres' : patmos_n,
'patch_icpp(1)%alpha_rho(1)' : rhol_n*alphal_back,
'patch_icpp(1)%alpha_rho(2)' : rhog_n*alphag_back,
'patch_icpp(1)%alpha(1)' : alphal_back,
'patch_icpp(1)%alpha(2)' : alphag_back,
# ==========================================================================


# Patch 2: Lung ============================================================
'patch_icpp(2)%geometry' : 7,
'patch_icpp(2)%hcid' : 205,
'patch_icpp(2)%alter_patch(1)' : 'T',
'patch_icpp(2)%x_centroid' : dlengx/2.,
'patch_icpp(2)%y_centroid' : -dlengy/4.,
'patch_icpp(2)%length_x' : dlengx,
'patch_icpp(2)%length_y' : dlengy/2.+2,
'patch_icpp(2)%a2' : interface_amp,
'patch_icpp(2)%vel(1)' : 0.E+00,
'patch_icpp(2)%vel(2)' : 0.0,
'patch_icpp(2)%pres' : patmos_n,
'patch_icpp(2)%alpha_rho(1)' : rhol_n*alphal_lung,
'patch_icpp(2)%alpha_rho(2)' : rhog_n*alphag_lung,
'patch_icpp(2)%alpha(1)' : alphal_lung,
'patch_icpp(2)%alpha(2)' : alphag_lung,
# ==========================================================================

# Fluids Physical Parameters ===============================================
'fluid_pp(1)%gamma' : 1.E+00/(gammal-1.E+00),
'fluid_pp(1)%pi_inf' : gammal*Bl_n/(gammal-1.E+00),
'fluid_pp(2)%gamma' : 1.E+00/(gammag-1.E+00),
'fluid_pp(2)%pi_inf' : gammag*Bg_n/(gammag-1.E+00),
# ==========================================================================

}))

# ==============================================================================
189 changes: 189 additions & 0 deletions examples/2D_lungwave_horizontal/case.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
#!/usr/bin/env python3

import math
import json

pi = 3.141592653589
# material parameters

#material1 :: gas
#patterson 2018

gammag = 1.4 #unitless
Bg =0 #pascals
rhog = 1.18 #kg/m^3
c_g = 347.2 #m/s
G_g = 0 #pa

#material2 :: water
gammal = 5.5
Bl = 492.E+06
rhol = 996.0
c_l = 1648.7
G_l = 1E3

#primitive vartiables
patmos = 101325. #pa

#problem specific variable
lambda_wave = 1E-3

#define pulse
P_amp = 10.E+6
P_len = 45 #length of the impulse
theta = -math.pi/2 #direction of propagation

#non-dim

#define characteristic density, length, time, stress material
rho_char = rhog
length_char = lambda_wave
c_char = c_g
time_char = length_char/c_char
stress_char = rho_char*c_char*c_char/gammag

#non-dim the properties
rhog_n = rhog/rho_char
c_g_n = c_g/c_char
rhol_n = rhol/rho_char
c_l_n = c_l/c_char
Bg_n = Bg/stress_char
Bl_n = Bl/stress_char
G_g_n = G_g/stress_char
G_l_n = G_l/stress_char
patmos_n = patmos/stress_char
P_amp_n = P_amp/stress_char

#geometry
dlengx = 10.
dlengy = 2.
Ny = 500
Nx = dlengx*Ny
dx = dlengx/Nx
dy = dlengy/Ny
alphal_back = 1.0
alphag_back = 0.0
alphal_lung = 0.0
alphag_lung = 1.0

interface_amp = 0.5

# time stepping requirements
time_end = 5
cfl = 8.0

dt = cfl * dx/c_l
Nt = int(time_end/dt)
Nframes = 500
tstart = 0
tstop = Nt
tsave = int(Nt/Nframes)

# Configuring case dictionary
print(json.dumps({
# Logistics ================================================================
'run_time_info' : 'T',
# ==========================================================================

# Computational Domain Parameters ==========================================
'x_domain%beg' : -dlengx/2.,
'x_domain%end' : dlengx/2.,
'y_domain%beg' : 0.,
'y_domain%end' : dlengy,
'm' : int(Nx),
'n' : int(Ny),
'p' : 0,
'dt' : dt,
't_step_start' : tstart,
't_step_stop' : tstop,
't_step_save' : tsave,
# ==========================================================================

# Simulation Algorithm Parameters ==========================================
'num_patches' : 2,
'model_eqns' : 2,
'alt_soundspeed' : 'F',
'num_fluids' : 2,
'adv_alphan' : 'T',
'mpp_lim' : 'T',
'mixture_err' : 'T',
'time_stepper' : 3,
'weno_order' : 5,
'weno_eps' : 1.E-16,
'weno_Re_flux' : 'F',
'weno_avg' : 'F',
'mapped_weno' : 'T',
'null_weights' : 'F',
'mp_weno' : 'T',
'riemann_solver' : 2,
'wave_speeds' : 1,
'avg_state' : 2,
'bc_x%beg' : -6,
'bc_x%end' : -6,
'bc_y%beg' : -1,
'bc_y%end' : -1,
# ==========================================================================

# Formatted Database Files Structure Parameters ============================
'format' : 1,
'precision' : 2,
'prim_vars_wrt' :'T',
'parallel_io' :'T',
# ==========================================================================

# Monopole setting =========================================================
'Monopole' : 'T', # creating an acoustic wave
'num_mono' : 1, # place in the middle and expand
'Mono(1)%pulse' : 3, # square wave
'Mono(1)%npulse' : 1, # 1 pulse
'Mono(1)%mag' : 100.0*patmos_n,# magnitude
'Mono(1)%length' : 45.0*dlengy, # pulse length
'Mono(1)%support' : 2, # 2D semi infinite plane (x: -inf,inf; y:-len/2, len/2)
'Mono(1)%support_width' : 30,
'Mono(1)%loc(1)' : 0.7*dlengy, # x_center of the domain
'Mono(1)%loc(2)' : dlengy/2, # upper boundary of the domain
'Mono(1)%dir' : -math.pi, # direction: -pi/2

# Patch 1: Background ======================================================
'patch_icpp(1)%geometry' : 3,
'patch_icpp(1)%x_centroid' : 0.,
'patch_icpp(1)%y_centroid' : dlengy/2.,
'patch_icpp(1)%length_x' : dlengx,
'patch_icpp(1)%length_y' : dlengy,
'patch_icpp(1)%vel(1)' : 0.,
'patch_icpp(1)%vel(2)' : 0.E+00,
'patch_icpp(1)%pres' : patmos_n,
'patch_icpp(1)%alpha_rho(1)' : rhol_n*alphal_back,
'patch_icpp(1)%alpha_rho(2)' : rhog_n*alphag_back,
'patch_icpp(1)%alpha(1)' : alphal_back,
'patch_icpp(1)%alpha(2)' : alphag_back,
# ==========================================================================

# Patch 2: Lung ============================================================
'patch_icpp(2)%geometry' : 7,
'patch_icpp(2)%hcid' : 206,
'patch_icpp(2)%alter_patch(1)' : 'T',
'patch_icpp(2)%x_centroid' : -dlengx/4.,
'patch_icpp(2)%y_centroid' : dlengy/2.,
'patch_icpp(2)%length_x' : dlengx/2.+2,
'patch_icpp(2)%length_y' : dlengy,
'patch_icpp(2)%a2' : interface_amp,
'patch_icpp(2)%vel(1)' : 0.E+00,
'patch_icpp(2)%vel(2)' : 0.0,
'patch_icpp(2)%pres' : patmos_n,
'patch_icpp(2)%alpha_rho(1)' : rhol_n*alphal_lung,
'patch_icpp(2)%alpha_rho(2)' : rhog_n*alphag_lung,
'patch_icpp(2)%alpha(1)' : alphal_lung,
'patch_icpp(2)%alpha(2)' : alphag_lung,
# ==========================================================================

# Fluids Physical Parameters ===============================================
'fluid_pp(1)%gamma' : 1.E+00/(gammal-1.E+00),
'fluid_pp(1)%pi_inf' : gammal*Bl_n/(gammal-1.E+00),
'fluid_pp(2)%gamma' : 1.E+00/(gammag-1.E+00),
'fluid_pp(2)%pi_inf' : gammag*Bg_n/(gammag-1.E+00),

#==============================================================================
}))

# ==============================================================================
Loading
Loading