Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90345034
rod_3d.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
Thu, Oct 31, 18:32
Size
1 KB
Mime Type
text/x-python
Expires
Sat, Nov 2, 18:32 (2 d)
Engine
blob
Format
Raw Data
Handle
22056883
Attached To
R6746 RationalROMPy
rod_3d.py
View Options
# Copyright (C) 2018 by the RROMPy authors
#
# This file is part of RROMPy.
#
# RROMPy is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# RROMPy is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with RROMPy. If not, see <http://www.gnu.org/licenses/>.
#
import
fenics
as
fen
from
rrompy.hfengines.vector_linear_problem
import
(
LinearElasticityProblemEngine
)
def
rod3Dsolver
():
mesh
=
fen
.
Mesh
(
"./tests/test_2_hfengines/rod.xml"
)
rho_
=
1e3
nu
=
.
45
E
=
1e6
g
=
1e3
solver
=
LinearElasticityProblemEngine
(
verbosity
=
0
)
solver
.
V
=
fen
.
VectorFunctionSpace
(
mesh
,
"P"
,
1
)
solver
.
lambda_
=
E
*
nu
/
(
1.
+
nu
)
/
(
1.
-
2
*
nu
)
solver
.
mu_
=
E
/
(
1.
+
nu
)
solver
.
forcingTerm
=
[
fen
.
Constant
((
0.
,
-
rho_
*
g
/
E
,
0.
)),
fen
.
Constant
((
0.
,
0.
,
0.
))]
solver
.
DirichletBoundary
=
lambda
x
,
on_b
:
on_b
and
fen
.
near
(
x
[
2
],
0.
)
solver
.
NeumannBoundary
=
"REST"
return
solver
Event Timeline
Log In to Comment