Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogstools
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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Max Bittens
ogstools
Commits
4d403ed7
Commit
4d403ed7
authored
1 year ago
by
Florian Zill
Browse files
Options
Downloads
Patches
Plain Diff
[propretylib] more docu for mesh_dependent
parent
8cbe4b5c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ogstools/propertylib/mesh_dependent.py
+49
-4
49 additions, 4 deletions
ogstools/propertylib/mesh_dependent.py
with
49 additions
and
4 deletions
ogstools/propertylib/mesh_dependent.py
+
49
−
4
View file @
4d403ed7
...
...
@@ -16,6 +16,11 @@ ValType = Union[PlainQuantity, np.ndarray]
# TODO: find smart way to choose between y values and depth
def
depth
(
mesh
:
pv
.
UnstructuredGrid
)
->
np
.
ndarray
:
"""
Return the depth values of the mesh.
This assumes the y-axes is the vertical axis. For each point, the shortest
distance to the top boundary is returned.
"""
# return -mesh.points[:, 1]
edges
=
mesh
.
extract_feature_edges
()
cell_bounds
=
np
.
asarray
([
cell
.
bounds
for
cell
in
edges
.
cell
])
...
...
@@ -31,7 +36,16 @@ def depth(mesh: pv.UnstructuredGrid) -> np.ndarray:
def
p_fluid
(
mesh
:
pv
.
UnstructuredGrid
)
->
PlainQuantity
:
"""
Return the fluid pressure in the mesh.
If not given, calculate by hypothetical water column.
"""
If
"
pressure
"
is not given in the mesh, it is calculated by a hypothetical
water column defined as:
.. math::
p_{fl} = 1000
\\
frac{kg}{m^3} 9.81
\\
frac{m}{s^2} h
where `h` is the depth below surface. If
"
depth
"
is not given in the mesh,
it is calculated via :py:func:`ogstools.propertylib.mesh_dependent.depth`.
"""
qty
=
u_reg
.
Quantity
if
"
pressure
"
in
mesh
.
point_data
:
return
qty
(
mesh
[
"
pressure
"
],
"
Pa
"
)
...
...
@@ -42,7 +56,18 @@ def p_fluid(mesh: pv.UnstructuredGrid) -> PlainQuantity:
def
fluid_pressure_criterion
(
mesh
:
pv
.
UnstructuredGrid
,
mesh_property
:
Property
)
->
PlainQuantity
:
"
Return the fluid pressure criterion.
"
"""
Return the fluid pressure criterion.
Defined as the difference between fluid pressure and minimal principal
stress (compression positive).
.. math::
F_{p} = p_{fl} -
\\
sigma_{min}
Fluid pressure is evaluated via
:py:func:`ogstools.propertylib.mesh_dependent.p_fluid`.
"""
qty
=
u_reg
.
Quantity
sigma
=
-
qty
(
mesh
[
mesh_property
.
data_name
],
mesh_property
.
data_unit
)
...
...
@@ -58,7 +83,9 @@ def dilatancy_critescu(
)
->
PlainQuantity
:
"""
Return the dilatancy criterion defined as:
:math:`F_{dil} =
\\
frac{
\\
tau}{
\\
sigma_0} - a
\\
left(
\\
frac{
\\
sigma_m}{
\\
sigma_0}
\\
right)^2 - b
\\
frac{
\\
sigma_m}{
\\
sigma_0}`
.. math::
F_{dil} =
\\
frac{
\\
tau_{oct}}{
\\
sigma_0} - a
\\
left(
\\
frac{
\\
sigma_m}{
\\
sigma_0}
\\
right)^2 - b
\\
frac{
\\
sigma_m}{
\\
sigma_0}
<https://www.sciencedirect.com/science/article/pii/S0360544222000512?via%3Dihub>
"""
...
...
@@ -76,6 +103,14 @@ def dilatancy_critescu(
dilatancy_critescu_eff
=
partial
(
dilatancy_critescu
,
effective
=
True
)
"""
Return the dilatancy criterion defined as:
.. math::
F
'
_{dil} =
\\
frac{
\\
tau_{oct}}{
\\
sigma_0} - a
\\
left(
\\
frac{
\\
sigma
'
_m}{
\\
sigma_0}
\\
right)^2 - b
\\
frac{
\\
sigma
'
_m}{
\\
sigma_0}
<https://www.sciencedirect.com/science/article/pii/S0360544222000512?via%3Dihub>
"""
def
dilatancy_alkan
(
...
...
@@ -86,7 +121,9 @@ def dilatancy_alkan(
)
->
ValType
:
"""
Return the dilatancy criterion defined as:
:math:`F_{dil} =
\\
tau -
\\
tau_{max}
\\
cdot b
\\
frac{
\\
sigma_m}{
\\
sigma_0 + b
\\
cdot
\\
sigma_m}`
.. math::
F_{dil} =
\\
tau_{oct} -
\\
tau_{max}
\\
cdot b
\\
frac{
\\
sigma
'
_m}{
\\
sigma_0 + b
\\
cdot
\\
sigma
'
_m}
<https://www.sciencedirect.com/science/article/pii/S1365160906000979>
"""
...
...
@@ -102,3 +139,11 @@ def dilatancy_alkan(
dilatancy_alkan_eff
=
partial
(
dilatancy_alkan
,
effective
=
True
)
"""
Return the dilatancy criterion defined as:
.. math::
F_{dil} =
\\
tau_{oct} -
\\
tau_{max}
\\
cdot b
\\
frac{
\\
sigma
'
_m}{
\\
sigma_0 + b
\\
cdot
\\
sigma
'
_m}
<https://www.sciencedirect.com/science/article/pii/S1365160906000979>
"""
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