Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F63651700
fracture.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, May 21, 15:15
Size
1 KB
Mime Type
text/x-python
Expires
Thu, May 23, 15:15 (2 d)
Engine
blob
Format
Raw Data
Handle
17801408
Attached To
R6746 RationalROMPy
fracture.py
View Options
from
rrompy.hfengines.linear_problem.bidimensional
import
\
MembraneFractureEngine
as
MFE
verb
=
100
mu0
=
[
45.
**
.
5
,
.
6
]
H
=
1.
L
=
.
75
delta
=
.
05
n
=
50
solver
=
MFE
(
mu0
=
mu0
,
H
=
H
,
L
=
L
,
delta
=
delta
,
n
=
n
,
verbosity
=
verb
)
uh
=
solver
.
solve
(
mu0
)[
0
]
solver
.
plotmesh
(
figsize
=
(
7.5
,
4.5
))
print
(
solver
.
norm
(
uh
))
solver
.
plot
(
uh
,
what
=
'REAL'
,
figsize
=
(
8
,
5
))
solver
.
plot
(
solver
.
residual
(
uh
,
mu0
)[
0
],
name
=
'res'
,
what
=
'REAL'
,
figsize
=
(
8
,
5
))
##
import
numpy
as
np
import
ufl
import
fenics
as
fen
from
rrompy.solver.fenics
import
affine_warping
L
=
mu0
[
1
]
y
=
fen
.
SpatialCoordinate
(
solver
.
V
.
mesh
())[
1
]
warp1
,
warpI1
=
affine_warping
(
solver
.
V
.
mesh
(),
np
.
array
([[
1
,
0
],
[
0
,
2.
*
L
]]))
warp2
,
warpI2
=
affine_warping
(
solver
.
V
.
mesh
(),
np
.
array
([[
1
,
0
],
[
0
,
2.
-
2.
*
L
]]))
warp
=
ufl
.
conditional
(
ufl
.
ge
(
y
,
0.
),
warp1
,
warp2
)
warpI
=
ufl
.
conditional
(
ufl
.
ge
(
y
,
0.
),
warpI1
,
warpI2
)
solver
.
plotmesh
([
warp
,
warpI
],
figsize
=
(
7.5
,
4.5
))
solver
.
plot
(
uh
,
[
warp
,
warpI
],
what
=
'REAL'
,
figsize
=
(
8
,
5
))
solver
.
plot
(
solver
.
residual
(
uh
,
mu0
)[
0
],
[
warp
,
warpI
],
name
=
'res'
,
what
=
'REAL'
,
figsize
=
(
8
,
5
))
Event Timeline
Log In to Comment