Skip to content

Commit

Permalink
use seissol v1.3/Rusanov fluxes/ vtkhdf/ extend tpv13 (#52)
Browse files Browse the repository at this point in the history
* use rusanov

* fix Dockerfile_jupyterlab

* small improvements on tpv13_training.geo

* update to msh4

* switch to main

* update both dockers

* use latest releases of SeisSol and PUMGen

* use vtk output for fault

* add rupture speed exercise

* combine subsidence plots and fix typo in geo

* close plotter to avoid memory leak

* precise exercise and input file

* disable vtk fault output for now

* add small exercice related with the initial stress

* add sympy

* fix dictionnary

* more precise instructions

* fix missing import module and format files naemes and variables with

* add subtitle for ground deformation exercise

* improve exercise with varying dip

* add pandas (for moment rate release)

* fix bug intoduced previously

* change task title

* fix clim for Vr
  • Loading branch information
Thomas-Ulrich authored Nov 11, 2024
1 parent f30588c commit 1b2bad0
Show file tree
Hide file tree
Showing 11 changed files with 201 additions and 86 deletions.
19 changes: 5 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,15 @@ RUN git clone --recursive https://github.com/TUM-I5/ASAGI.git \
&& CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DSHARED_LIB=off -DSTATIC_LIB=on -DNONUMA=on \
&& make -j$(nproc) && make install

RUN git clone https://github.com/uphoffc/ImpalaJIT.git \
&& cd ImpalaJIT \
&& mkdir build && cd build \
&& cmake .. && make -j $(nproc) install

RUN git clone https://github.com/SeisSol/easi \
&& cd easi \
&& mkdir build && cd build \
&& CC=mpicc CXX=mpicxx cmake .. -DEASICUBE=OFF -DLUA=ON -DCMAKE_PREFIX_PATH=/home/tools -DCMAKE_INSTALL_PREFIX=/home/tools -DASAGI=ON -DIMPALAJIT=ON .. \
&& CC=mpicc CXX=mpicxx cmake .. -DEASICUBE=OFF -DLUA=ON -DCMAKE_PREFIX_PATH=/home/tools -DCMAKE_INSTALL_PREFIX=/home/tools -DASAGI=ON -DIMPALAJIT=OFF .. \
&& make -j$(nproc) && make install

RUN pip install numpy && docker-clean

RUN git clone --recursive --depth 1 --single-branch --branch v1.1.3 https://github.com/SeisSol/SeisSol.git \
RUN git clone --recursive --depth 1 --single-branch --branch v1.3.0 https://github.com/SeisSol/SeisSol.git \
&& cd SeisSol \
&& mkdir build_hsw && cd build_hsw \
&& export PATH=$PATH:/home/tools/bin \
Expand All @@ -116,13 +111,7 @@ RUN cd SeisSol/preprocessing/science/rconv \
&& CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_PREFIX_PATH=/home/tools \
&& make -j$(nproc) && cp rconv /home/tools/bin/

RUN git clone --recursive --depth 1 --single-branch --branch v2.2.7 https://github.com/SCOREC/core.git \
&& cd core \
&& mkdir build && cd build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Release -DSCOREC_CXX_FLAGS="-Wno-error=array-bounds" \
&& make -j$(nproc) && make install

RUN git clone --recursive --branch v1.0.1 https://github.com/SeisSol/PUMGen.git \
RUN git clone --recursive --branch v1.1.0 https://github.com/SeisSol/PUMGen.git \
&& cd PUMGen \
&& mkdir build && cd build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Release \
Expand Down Expand Up @@ -163,6 +152,8 @@ RUN conda install \
matplotlib \
gmsh \
python-gmsh \
sympy \
pandas \
&& docker-clean
ENV PATH=/home/tools/bin:$PATH
ENV OMP_PLACES="cores"
Expand Down
14 changes: 5 additions & 9 deletions Dockerfile_jupyterlab
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ RUN git clone https://github.com/SeisSol/easi \
&& CC=mpicc CXX=mpicxx cmake .. -DEASICUBE=OFF -DLUA=ON -DCMAKE_PREFIX_PATH=/home/tools -DCMAKE_INSTALL_PREFIX=/home/tools -DASAGI=ON -DIMPALAJIT=OFF .. \
&& make -j$(nproc) && make install

RUN pip install numpy && pip install git+https://github.com/SeisSol/PSpaMM.git@davschneller/compile-fixes && docker-clean
RUN pip install numpy && pip install git+https://github.com/SeisSol/PSpaMM.git && docker-clean

#RUN git clone --depth 1 --single-branch --branch main https://github.com/libxsmm/libxsmm.git \
# && cd libxsmm \
Expand All @@ -104,7 +104,7 @@ RUN pip install numpy && pip install git+https://github.com/SeisSol/PSpaMM.git@d
# -j$(nproc) generator \
# && cp bin/libxsmm_gemm_generator /home/tools/bin

RUN git clone --recursive --depth 1 --single-branch --branch v1.1.3 https://github.com/SeisSol/SeisSol.git \
RUN git clone --recursive --depth 1 --single-branch --branch v1.3.0 https://github.com/SeisSol/SeisSol.git \
&& cd SeisSol \
&& mkdir build_hsw && cd build_hsw \
&& export PATH=$PATH:/home/tools/bin \
Expand All @@ -121,13 +121,7 @@ RUN cd SeisSol/preprocessing/science/rconv \
&& CC=mpicc CXX=mpicxx cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_PREFIX_PATH=/home/tools \
&& make -j$(nproc) && cp rconv /home/tools/bin/

RUN git clone --recursive --depth 1 --single-branch --branch v2.2.7 https://github.com/SCOREC/core.git \
&& cd core \
&& mkdir build && cd build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Release -DSCOREC_CXX_FLAGS="-Wno-error=array-bounds" \
&& make -j$(nproc) && make install

RUN git clone --recursive https://github.com/SeisSol/PUMGen.git \
RUN git clone --recursive --branch v1.1.0 https://github.com/SeisSol/PUMGen.git \
&& cd PUMGen \
&& mkdir build && cd build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Release \
Expand Down Expand Up @@ -169,6 +163,8 @@ RUN conda install \
matplotlib \
gmsh \
python-gmsh \
sympy \
pandas \
&& docker-clean
ENV PATH=/home/tools/bin:$PATH
ENV OMP_PLACES="cores"
Expand Down
2 changes: 2 additions & 0 deletions kaikoura/parametersLSW.par
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Tv=0.05
!Attenuation parameters (ignored if not compiled with attenuation)
FreqCentral=0.5
FreqRatio=100
numflux = 'rusanov' ! The numerical flux. Values: 'godunov', 'rusanov'
numfluxnearfault = 'rusanov' ! The numerical flux for faces of cells adjacent to the fault (on cells which have at least one DR face), excluding the DR faces themselves. Values: 'godunov', 'rusanov'
/

&IniCondition
Expand Down
3 changes: 3 additions & 0 deletions kaikoura/parametersRS.par
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Tv=0.05
!Attenuation parameters (ignored if not compiled with attenuation)
FreqCentral=0.5
FreqRatio=100

numflux = 'rusanov' ! The numerical flux. Values: 'godunov', 'rusanov'
numfluxnearfault = 'rusanov' ! The numerical flux for faces of cells adjacent to the fault (on cells which have at least one DR face), excluding the DR faces themselves. Values: 'godunov', 'rusanov'
/

&IniCondition
Expand Down
2 changes: 2 additions & 0 deletions sulawesi/parametersLSW.par
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Tv=0.05
!Attenuation parameters (ignored if not compiled with attenuation)
FreqCentral=0.3
FreqRatio=100
numflux = 'rusanov' ! The numerical flux. Values: 'godunov', 'rusanov'
numfluxnearfault = 'rusanov' ! The numerical flux for faces of cells adjacent to the fault (on cells which have at least one DR face), excluding the DR faces themselves. Values: 'godunov', 'rusanov'
/

&IniCondition
Expand Down
2 changes: 2 additions & 0 deletions sulawesi/parametersRS.par
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Tv=0.05
!Attenuation parameters (ignored if not compiled with attenuation)
FreqCentral=0.3
FreqRatio=100
numflux = 'rusanov' ! The numerical flux. Values: 'godunov', 'rusanov'
numfluxnearfault = 'rusanov' ! The numerical flux for faces of cells adjacent to the fault (on cells which have at least one DR face), excluding the DR faces themselves. Values: 'godunov', 'rusanov'
/

&IniCondition
Expand Down
6 changes: 5 additions & 1 deletion tpv13/parameters.par
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ MaterialFileName = 'tpv12_13_material.yaml'
!enable off-fault plasticity (ignored in Plasticity=0)
Plasticity = 1
Tv = 0.03
numflux = 'rusanov' ! The numerical flux. Values: 'godunov', 'rusanov'
numfluxnearfault = 'rusanov' ! The numerical flux for faces of cells adjacent to the fault (on cells which have at least one DR face), excluding the DR faces themselves. Values: 'godunov', 'rusanov'
/

&IniCondition
Expand Down Expand Up @@ -34,6 +36,7 @@ printtimeinterval_sec = 1.0 ! Time interval at which output w
OutputMask = 1 1 1 1 1 1 1 1 1 1 1 ! turn on and off fault outputs
refinement_strategy = 2
refinement = 1
!vtkorder = 3
/

!parameterize ascii fault file outputs
Expand Down Expand Up @@ -68,8 +71,9 @@ refinement = 1

! Free surface output
SurfaceOutput = 1
SurfaceOutputRefinement = 1
SurfaceOutputRefinement = 0
SurfaceOutputInterval = 2.0
surfacevtkorder = 2

pickdt = 0.005 ! Pickpoint Sampling
RFileName = 'tpv12_13_receivers.dat' ! Record Points in extra file
Expand Down
38 changes: 21 additions & 17 deletions tpv13/tpv12_13_fault.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
!Switch
[s_xx, s_yy, s_zz, s_xy, s_yz, s_xz]: !Include tpv12_13_initial_stress.yaml
[mu_s, mu_d, d_c, cohesion]: !IdentityMap
components:
# Inside nucleation patch
- !AxisAlignedCuboidalDomainFilter
limits:
x: [-1500, 1500]
y: [-.inf, .inf]
z: [-11691.34295108992, -9093.266739736605]
components: !ConstantMap
map:
mu_s: 0.54
mu_d: 0.10
d_c: 0.50
cohesion: -200000
# Outside nucleation patch
- !ConstantMap
[mu_d, d_c, cohesion]: !ConstantMap
map:
mu_s: 0.70
mu_d: 0.10
d_c: 0.50
cohesion: -200000
[mu_s]: !LuaMap
returns: [mu_s]
function: |
function f(x)
mu_s = 0.7
nucleation_size = 3000.0
along_width_nucleation_center = 12000.0
sinDip = math.sin(60 * math.pi / 180)
x_in_nucleation = (math.abs(x["x"]) <= 0.5 * nucleation_size)
z_in_nucleation = (
math.abs(x["z"] + along_width_nucleation_center * sinDip) <=
0.5 * nucleation_size * sinDip
)
if x_in_nucleation and z_in_nucleation then
mu_s = 0.54
end
return { mu_s = mu_s }
end
[Tnuc_n, Tnuc_s, Tnuc_d, forced_rupture_time]: !ConstantMap
map:
Tnuc_n: 0
Expand Down
5 changes: 3 additions & 2 deletions tpv13/tpv12_13_initial_stress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
depth = math.abs(x["z"])
s_max_minus_Pf = 9.8 * (2700.0 - 1000.0);
if (depth<=11951.15) then
s3_to_s1 = 0.3496
-- math.floor(a+0.5) is round
s_xx = -0.01 * math.floor(100.0 * (0.5 * (1.0 + 0.3496) * s_max_minus_Pf) + 0.5) * depth
s_yy = -0.01 * math.floor(100.0 * (0.3496 * s_max_minus_Pf) + 0.5) * depth
s_xx = -0.01 * math.floor(100.0 * (0.5 * (1.0 + s3_to_s1) * s_max_minus_Pf) + 0.5) * depth
s_yy = -0.01 * math.floor(100.0 * (s3_to_s1 * s_max_minus_Pf) + 0.5) * depth
s_zz = -s_max_minus_Pf * depth
else
s_xx = -s_max_minus_Pf * depth
Expand Down
Loading

0 comments on commit 1b2bad0

Please sign in to comment.