Skip to content

Commit 2f5a542

Browse files
committed
adds Moon example
1 parent 2cd3770 commit 2f5a542

21 files changed

Lines changed: 148173 additions & 0 deletions
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
APOLLO 16 S-IVB BOOSTER IMPACT
2+
time shift: 0.0000
3+
hdurorf0: 0.1
4+
latorUTM: 1.9210
5+
longorUTM: 335.3770
6+
depth: 0.0
7+
source time function: 0
8+
factor force source: 3.6d8
9+
component dir vect source E: -0.1845634
10+
component dir vect source N: -0.0484193
11+
component dir vect source Z_UP: -0.9816272

EXAMPLES/real_world/Moon_Apollo_impact/DATA/Par_file

Lines changed: 408 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
S-IVB AP16 1.9210 335.3770 0.0 0.0
2+
S12 XA -3.01084 -23.42456 0.0 0.0
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
#-----------------------------------------------------------
2+
#
3+
# Meshing input parameters
4+
#
5+
#-----------------------------------------------------------
6+
7+
# coordinates of mesh block in latitude/longitude and depth in km
8+
LATITUDE_MIN = -5.0
9+
LATITUDE_MAX = 5.0
10+
LONGITUDE_MIN = -30.0
11+
LONGITUDE_MAX = -20.0
12+
DEPTH_BLOCK_KM = 100.d0
13+
UTM_PROJECTION_ZONE = 20
14+
SUPPRESS_UTM_PROJECTION = .false.
15+
16+
# file that contains the interfaces of the model / mesh
17+
INTERFACES_FILE = interfaces.dat
18+
19+
# file that contains the cavity
20+
CAVITY_FILE = dummy
21+
22+
# number of elements at the surface along edges of the mesh at the surface
23+
# (must be 8 * multiple of NPROC below if mesh is not regular and contains mesh doublings)
24+
# (must be multiple of NPROC below if mesh is regular)
25+
NEX_XI = 128
26+
NEX_ETA = 128
27+
28+
# number of MPI processors along xi and eta (can be different)
29+
NPROC_XI = 4
30+
NPROC_ETA = 2
31+
32+
#-----------------------------------------------------------
33+
#
34+
# Doubling layers
35+
#
36+
#-----------------------------------------------------------
37+
38+
# Regular/irregular mesh
39+
USE_REGULAR_MESH = .false.
40+
# Only for irregular meshes, number of doubling layers and their position
41+
NDOUBLINGS = 4
42+
# NZ_DOUBLING_1 is the parameter to set up if there is only one doubling layer
43+
# (more doubling entries can be added if needed to match NDOUBLINGS value)
44+
NZ_DOUBLING_1 = 4
45+
NZ_DOUBLING_2 = 6
46+
NZ_DOUBLING_3 = 12
47+
NZ_DOUBLING_4 = 14
48+
49+
#-----------------------------------------------------------
50+
#
51+
# Visualization
52+
#
53+
#-----------------------------------------------------------
54+
55+
# create mesh files for visualisation or further checking
56+
CREATE_ABAQUS_FILES = .false.
57+
CREATE_DX_FILES = .false.
58+
CREATE_VTK_FILES = .true.
59+
60+
# stores mesh files as cubit-exported files into directory MESH/ (for single process run)
61+
SAVE_MESH_AS_CUBIT = .false.
62+
63+
# path to store the databases files
64+
LOCAL_PATH = ./DATABASES_MPI
65+
66+
#-----------------------------------------------------------
67+
#
68+
# CPML
69+
#
70+
#-----------------------------------------------------------
71+
72+
# CPML perfectly matched absorbing layers
73+
THICKNESS_OF_X_PML = 0.05d0
74+
THICKNESS_OF_Y_PML = 0.05d0
75+
THICKNESS_OF_Z_PML = 0.1d0
76+
77+
# add PML layers as extra outer mesh layers
78+
ADD_PML_AS_EXTRA_MESH_LAYERS = .true.
79+
NUMBER_OF_PML_LAYERS_TO_ADD = 2
80+
81+
#-----------------------------------------------------------
82+
#
83+
# Domain materials
84+
#
85+
#-----------------------------------------------------------
86+
87+
# number of materials
88+
NMATERIALS = 3
89+
# define the different materials in the model as:
90+
# #material_id #rho #vp #vs #Q_Kappa #Q_mu #anisotropy_flag #domain_id
91+
# Q_Kappa : Q_Kappa attenuation quality factor
92+
# Q_mu : Q_mu attenuation quality factor
93+
# anisotropy_flag : 0 = no anisotropy / 1,2,... check the implementation in file aniso_model.f90
94+
# domain_id : 1 = acoustic / 2 = elastic / 3 = poroelastic
95+
1 3312 7540 4340 9999. 6750.0 0 2 # moon mantle
96+
2 2762 3200 1800 9999. 6750.0 0 2 # moon upper crust
97+
3 2600 1000 500 9999. 6750.0 0 2 # moon regolith
98+
99+
#-----------------------------------------------------------
100+
#
101+
# Domain regions
102+
#
103+
#-----------------------------------------------------------
104+
105+
# number of regions
106+
NREGIONS = 3
107+
# define the different regions of the model as :
108+
#NEX_XI_BEGIN #NEX_XI_END #NEX_ETA_BEGIN #NEX_ETA_END #NZ_BEGIN #NZ_END #material_id
109+
1 -1 1 -1 1 4 1
110+
1 -1 1 -1 5 14 2
111+
1 -1 1 -1 15 15 3
112+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-8000.0
2+
-8000.0
3+
-8000.0
4+
-8000.0
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-30800.0
2+
-30800.0
3+
-30800.0
4+
-30800.0
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# number of interfaces
2+
4
3+
4+
# We describe each interface below, structured as a 2D-grid, with several parameters :
5+
# number of points along XI and ETA, minimal XI ETA coordinates
6+
# and spacing between points which must be constant.
7+
# Then the records contain the Z coordinates of the NXI x NETA points.
8+
#
9+
# interface moho
10+
# SUPPRESS_UTM_PROJECTION NXI NETA LONG_MIN LAT_MIN SPACING_XI SPACING_ETA
11+
.true. 2 2 68634.88 155340.91 0.0045 -0.0045
12+
interface.moho.dat
13+
14+
# interface intermediate
15+
.true. 2 2 68634.88 155340.91 0.0045 -0.0045
16+
interface.inter.dat
17+
18+
# interface at 1km depth
19+
.false. 203 205 -30.0 5.1 0.05000000000000071 -0.04999999999999982
20+
ptopo.xyz.2.dat
21+
22+
# interface (topography, top of the mesh)
23+
.false. 203 205 -30.0 5.1 0.05000000000000071 -0.04999999999999982
24+
ptopo.xyz.1.dat
25+
26+
# for each layer, we give the number of spectral elements in the vertical direction
27+
# layer number 1 (mantle layer)
28+
5
29+
# layer number 2 (crust layer)
30+
7
31+
# layer number 3 (crust layer)
32+
2
33+
# layer number 4 (top layer)
34+
1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../topo_data/ptopo.xyz.1.dat
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../topo_data/ptopo.xyz.2.dat
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Apollo 16 booster impact
2+
3+
---
4+
5+
![screenshot of mesh with Vs velocities](./REF_SEIS/image.mesh-vs.jpg)
6+
7+
This is a simple example for a Moon simulation. It takes the lunar topography and sets up a model
8+
around the Apollo 16 booster impact and the seismic station installed by Apollo 12.
9+
10+
The Apollo 16 S-IVB booster impact (Onodera et al. 2022; Wagner et al. 2017) details are:
11+
* time of impact approximately on April 19, 1972, 21:02:04 (UTC)
12+
* location is at lat = 1.9210, lon = 335.3770 (deg)
13+
* impact angle specified by angle from horizon: 79, heading angle (NE): 255.3 (deg)
14+
* relatively low impact speed v ~ 2.6 km/s, and assumed booster mass (stage at impact) m ~ 13,973 kg
15+
* momentum p = m * v ~ 3.6 * 10^7 [kg m/s], with an estimated deceleration time dt ~ 0.1 s,
16+
leads to an average force F = p / dt ~ 3.6 * 10^8 [N]
17+
18+
19+
Moon stations:
20+
```
21+
S12 XA -3.01084 -23.42456 0.0 0.0 # Apollo 12
22+
S14 XA -3.64450 -17.47753 0.0 0.0
23+
S15 XA 26.13407 3.62981 0.0 0.0
24+
S16 XA -8.97577 15.49649 0.0 0.0
25+
```
26+
27+
For meshing, we use a Moho interface at an estimated 30.8 km depth (at Apollo 12 landing site) and a 3-layer model.
28+
The top, middle and bottom layers have regolith, crustal and mantle rock properties respectively.
29+
The values are taken from Garcia et al. (2011) VPREMOON model.
30+
31+
----
32+
33+
## Setup
34+
35+
The setup of the model is meant for a low-resolution movie simulation that runs on 8 CPU-cores.
36+
The mesh is build for the region around the booster impact and the Apollo 12 seismic station,
37+
an area from longitude -30 to -20 degrees, latitude from -5 to 5 degrees.
38+
39+
The setup is done by the following steps:
40+
41+
* **Step 1:** Mesh setup
42+
43+
We will use the in-house mesher `xmeshfem3D` to create our simulation mesh. The main files in `DATA/meshfem3D_files/Mesh_Par_file`
44+
and `interfaces.dat` are setup such that we will have 3 layers, where the Moho surface at 30.8 km depth is added manually by
45+
creating a flat interface file `interface.moho.dat`.
46+
47+
To facilitate the meshing with doubling-layers, we also add an additional intermediate flat interface at 8 km depth from where the mesh
48+
will start the stretching to account for the topography. This avoids issues with elements having negative Jacobians due to the stretching
49+
and doubling of the mesh element sizes.
50+
51+
In `interfaces.dat`, we also added two more entries for the surfaces `ptopo.xyz.*.dat` that will be created and modified accordingly in the next step.
52+
53+
54+
* **Step 2:** Topography
55+
56+
To create the mesh topographic surface of the Moon, we do:
57+
```
58+
> cd EXAMPLES/real_world/Moon_Apollo_impact
59+
> ln -s ../../../utils/scripts/run_get_simulation_topography.py
60+
```
61+
and then
62+
```
63+
> ./run_get_simulation_topography.py -30 -5 -20 5 --SRTM=moon --toposhift=1000.0 --toposcale=0.9
64+
```
65+
66+
This script creates the files needed in a subfolder `topo_data/`, in particular the topography surface (`ptopo.xyz.1.dat`) and
67+
a down-shifted surface (`ptopo.xyz.2.dat`, by approximately 1 km and a slight down-scaling of the topography by factor `0.9`)
68+
to defined our regolith elements within this layer.
69+
70+
The script also modified the entries in the `interfaces.dat` to read the correct number of entries and increments.
71+
It also modifies `Mesh_Par_file` to set the correct mesh lat/lon-dimensions and lunar projection zone number (as the `UTM_PROJECTION_ZONE`).
72+
73+
> [!NOTE]
74+
> For Moon simulations, instead of the Universal Transverse Mercator (UTM) projection valid for Earth, the mesher will use a Lunar Transverse Mercator (LTM) projection (for latitudes between [-82,82] degrees) or a Lunar Polar Stereographic (LPS) at North/South pole regions. To enable these lunar projections, use a model name starting with `moon_***` (see `moon_default` in `Par_file`; or use `moon_tomo` for combining it with a tomography model).
75+
> The zone numbers are positive for the Northern hemisphere and negative for Southern hemisphere. LTM uses zone numbers in the range +/- [1,45], LPS uses 46 for North pole and -46 for South pole regions. The script `run_get_simulation_topography.py` will output the corresponding zone number for the specified area (using its midpoint to determine the zone).
76+
77+
78+
79+
* **Step 3:** source and station
80+
81+
The station "S12" added in `DATA/STATIONS` is the Apollo 12 seismic station at location lat/lon = (-3.01084, -23.42456) (deg).
82+
For the Apollo 16 S-IVB booster impact, we use a point force `DATA/FORCESOLUTION` at location lat/lon = (1.9210, 335.3770) (deg).
83+
The source time function is a Gaussian with a force factor and direction estimated by the informations given above.
84+
85+
86+
For convenience, this example folder has all these required setup files to run directly the wave simulation.
87+
88+
---
89+
90+
## Scattering perturbations
91+
92+
For this moon model, we will add random 3D scattering perturbations with a von Karman distribution in the regolith and crustal layers. The following entries can be added in the `DATA/Par_file` to add such perturbations:
93+
```
94+
## scattering
95+
# adds scattering perturbations to velocity model
96+
SCATTERING_PERTURBATIONS = .true.
97+
# perturbation strength
98+
SCATTERING_STRENGTH = 0.4d0
99+
# correlation factor
100+
SCATTERING_CORRELATION = 5.d0
101+
# list of material ids to apply scattering perturbations (0 == for all materials)
102+
SCATTERING_MATERIAL_IDS = 2,3
103+
```
104+
Here we chose some arbitrary values just to visualize its effect. The settings will create perturbations with a strength of 40% and a von Karman correlation factor 5.0 that leads to an approximated correlation length of ~664 m (see output in `OUTPUT_FILES/output_generate_databases.txt`). The material IDs "2,3" are depicting the crustal and regolith material layers defined in the mesh by `Mesh_Par_file`.
105+
106+
107+
----
108+
109+
## Wave simulation:
110+
111+
To run our simulation, just type:
112+
```
113+
> ./run_this_example.sh
114+
```
115+
116+
The simulation is meant as a movie simulation. To suppress numerical noise for a cleaner movie visualization, we enlarged the source half-duration
117+
by `HDUR_MOVIE = 8.0` in the `Par_file`.
118+
119+
The solver will create binary movie files in `OUTPUT_FILES/` folder. To convert them to VTK-files that can be visualize e.g. with Paraview,
120+
we run the script:
121+
```
122+
> ./xcreate_movie_files.sh
123+
```
124+
125+
126+
127+

0 commit comments

Comments
 (0)