Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Geodynamik-Übungen
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Wegener, Johannes
Geodynamik-Übungen
Commits
43b9f59a
Commit
43b9f59a
authored
3 years ago
by
Peppel, Daniel
Browse files
Options
Downloads
Patches
Plain Diff
Trägheitsmoment und Umrechnung in kg eingefügt
parent
e40ac829
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
AdamsWilliamsonCMB.py
+16
-4
16 additions, 4 deletions
AdamsWilliamsonCMB.py
with
16 additions
and
4 deletions
AdamsWilliamsonCMB.py
+
16
−
4
View file @
43b9f59a
...
@@ -54,6 +54,9 @@ def mass_correction(rho, r):
...
@@ -54,6 +54,9 @@ def mass_correction(rho, r):
res
+=
(
4
/
3
)
*
pi
*
rho
[
i
]
*
-
(
r
[
i
]
**
3
-
r
[
i
-
1
]
**
3
)
res
+=
(
4
/
3
)
*
pi
*
rho
[
i
]
*
-
(
r
[
i
]
**
3
-
r
[
i
-
1
]
**
3
)
return
res
return
res
def
moment_of_inertia
(
r1
,
r2
,
M
):
return
2
/
5
*
M
*
(
r1
**
5
-
r2
**
5
)
/
(
r1
**
3
-
r2
**
3
)
file
=
os
.
getcwd
()
+
r
"
\VpVs-valuesak135.csv
"
file
=
os
.
getcwd
()
+
r
"
\VpVs-valuesak135.csv
"
...
@@ -62,7 +65,7 @@ file = os.getcwd() + r"\VpVs-valuesak135.csv"
...
@@ -62,7 +65,7 @@ file = os.getcwd() + r"\VpVs-valuesak135.csv"
depth
,
density
,
vp
,
vs
=
read_data
(
file
)
# Tiefe, Dichte, vp, vs
depth
,
density
,
vp
,
vs
=
read_data
(
file
)
# Tiefe, Dichte, vp, vs
# r geht vom Mittelpunkt nach außen
# r geht vom Mittelpunkt nach außen
r
=
6371
-
depth
r
=
(
6371
-
depth
)
*
1000
# Startbedingungen
# Startbedingungen
rho_0
=
3000
# kg/m^3
rho_0
=
3000
# kg/m^3
...
@@ -80,14 +83,23 @@ for i in range(9, len(rho_ex)):
...
@@ -80,14 +83,23 @@ for i in range(9, len(rho_ex)):
rho_ex
[
i
]
=
9900
rho_ex
[
i
]
=
9900
rho_im
[
i
]
=
9900
rho_im
[
i
]
=
9900
else
:
else
:
rho_ex
[
i
]
=
density_expansion_explicit
(
rho_ex
[
i
-
1
],
vp
[
i
-
1
],
vs
[
i
-
1
],
r
[
i
-
1
],
r
[
i
])
rho_ex
[
i
]
=
density_expansion_explicit
(
rho_ex
[
i
-
1
],
vp
[
i
-
1
]
*
1000
,
vs
[
i
-
1
]
*
1000
,
r
[
i
-
1
],
r
[
i
])
rho_im
[
i
]
=
density_expansion_implicit
(
rho_im
[
i
-
1
],
vp
[
i
-
1
],
vs
[
i
-
1
],
r
[
i
-
1
],
r
[
i
])
rho_im
[
i
]
=
density_expansion_implicit
(
rho_im
[
i
-
1
],
vp
[
i
-
1
]
*
1000
,
vs
[
i
-
1
]
*
1000
,
r
[
i
-
1
],
r
[
i
])
masse
[
i
]
=
mass
(
r
[
i
-
1
],
rho_ex
[
i
-
1
])
masse
[
i
]
=
mass
(
r
[
i
-
1
],
rho_ex
[
i
-
1
])
# Berechnung des Trägkeitsmomnts
J
=
np
.
zeros
(
len
(
masse
))
for
i
in
range
(
len
(
masse
)
-
1
):
if
r
[
i
]
!=
r
[
i
+
1
]:
J
[
i
]
=
moment_of_inertia
(
r
[
i
],
r
[
i
+
1
],
masse
[
i
])
J
[
-
1
]
=
moment_of_inertia
(
r
[
i
],
0
,
masse
[
i
])
J_ges
=
sum
(
J
)
print
(
"
Earth mass explicit:
"
,
mass_correction
(
rho_ex
,
r
))
print
(
"
Earth mass explicit:
"
,
mass_correction
(
rho_ex
,
r
))
print
(
"
Earth mass implicit:
"
,
mass_correction
(
rho_im
,
r
))
print
(
"
Earth mass implicit:
"
,
mass_correction
(
rho_im
,
r
))
print
(
"
Earth mass exact:
"
,
mass_correction
(
density
,
r
))
print
(
"
Earth mass exact:
"
,
mass_correction
(
density
,
r
))
print
(
J_ges
)
plt
.
plot
(
depth
,
rho_ex
)
plt
.
plot
(
depth
,
rho_ex
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment