Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
finstripwrapper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
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
Malo Rosemeier
finstripwrapper
Commits
9355ae3c
Commit
9355ae3c
authored
3 weeks ago
by
rosmal
Browse files
Options
Downloads
Patches
Plain Diff
py3, circumvent if no webs present
parent
b9a2765d
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
finstrip_wrapper/core/blade.py
+34
-22
34 additions, 22 deletions
finstrip_wrapper/core/blade.py
with
34 additions
and
22 deletions
finstrip_wrapper/core/blade.py
+
34
−
22
View file @
9355ae3c
...
...
@@ -42,7 +42,7 @@ class FINSTRIPWrapperBlade(FINSTRIPWrapper):
# use BECAS cross section properties or not
self
.
use_becas_stiffness
=
False
for
k
,
w
in
kwargs
.
iter
items
():
for
k
,
w
in
kwargs
.
items
():
try
:
setattr
(
self
,
k
,
w
)
except
:
...
...
@@ -140,7 +140,7 @@ class FINSTRIPWrapperBlade(FINSTRIPWrapper):
out_str
.
append
(
'
%s, %0.2f
'
%
(
var_name
,
var_value
)
+
n
)
# write materials
mat_names
=
self
.
cs2d
[
'
materials
'
].
keys
()
mat_names
=
list
(
self
.
cs2d
[
'
materials
'
].
keys
()
)
matprops
=
self
.
cs2d
[
'
matprops
'
]
def
_write_iso
(
out_str
,
n
,
label
,
E1
,
nu12
,
rho
):
...
...
@@ -372,21 +372,29 @@ class FINSTRIPWrapperBlade(FINSTRIPWrapper):
# actual amount of webs in post processing files can differ from input
# NOTE: if the flatback web is oriented such that it closes the cross section,
# then it is identified as if the web was part of the surface
# If only a closed shape without real shear web is processed, the code
# herafter crashes, needs to be fixed to handle circular shape at root
self
.
nweb
=
len
(
idxs
[
1
:])
self
.
nnode_web
=
[]
for
w
in
range
(
self
.
nweb
):
self
.
nnode_web
.
append
(
idxs
[
w
+
1
]
-
idxs
[
w
]
+
1
)
if
self
.
nweb
>
0
:
# circumvent if no webs are present
self
.
nnode_web
=
[]
for
w
in
range
(
self
.
nweb
):
self
.
nnode_web
.
append
(
idxs
[
w
+
1
]
-
idxs
[
w
]
+
1
)
self
.
nnode_web_max
=
np
.
max
(
np
.
array
(
self
.
nnode_web
))
self
.
node_loc_web
=
np
.
zeros
(
(
self
.
nweb
,
self
.
nnode_web_max
,
2
))
for
w
in
range
(
self
.
nweb
):
self
.
node_loc_web
[
w
,
:
self
.
nnode_web
[
w
]
-
1
,
:]
=
self
.
mode_shape
[
0
,
0
,
idxs
[
w
]
+
1
:
idxs
[
w
+
1
]
+
1
,
:
2
]
# add second node of last element
self
.
node_loc_web
[
w
,
self
.
nnode_web
[
w
]
-
1
,
:]
=
self
.
mode_shape
[
0
,
0
,
idxs
[
w
+
1
],
2
:
4
]
self
.
nnode_web_max
=
np
.
max
(
np
.
array
(
self
.
nnode_web
))
self
.
node_loc_web
=
np
.
zeros
(
(
self
.
nweb
,
self
.
nnode_web_max
,
2
))
for
w
in
range
(
self
.
nweb
):
self
.
node_loc_web
[
w
,
:
self
.
nnode_web
[
w
]
-
1
,
:]
=
self
.
mode_shape
[
0
,
0
,
idxs
[
w
]
+
1
:
idxs
[
w
+
1
]
+
1
,
:
2
]
# add second node of last element
self
.
node_loc_web
[
w
,
self
.
nnode_web
[
w
]
-
1
,
:]
=
self
.
mode_shape
[
0
,
0
,
idxs
[
w
+
1
],
2
:
4
]
else
:
self
.
nnode_web
=
[
0
]
self
.
nnode_web_max
=
0
self
.
node_loc_web
=
np
.
zeros
(
(
self
.
nweb
,
self
.
nnode_web_max
,
2
))
# obtain surface displacements
self
.
node_u_surf
=
np
.
zeros
(
...
...
@@ -398,14 +406,18 @@ class FINSTRIPWrapperBlade(FINSTRIPWrapper):
:,
:,
-
1
,
:]
=
self
.
mode_shape
[:,
:,
idxs
[
0
],
6
:]
# obtain web displacements
self
.
node_u_web
=
np
.
zeros
(
(
self
.
ncase
,
self
.
nweb
,
self
.
nmode
,
self
.
nnode_web_max
,
2
))
for
w
in
range
(
self
.
nweb
):
self
.
node_u_web
[
:,
w
,
:,
:
self
.
nnode_web
[
w
]
-
1
,
:]
=
self
.
mode_shape
[:,
:,
idxs
[
w
]
+
1
:
idxs
[
w
+
1
]
+
1
,
4
:
6
]
# add second node of last element
self
.
node_u_web
[:,
w
,
:,
self
.
nnode_web
[
w
]
-
1
,
:]
=
self
.
mode_shape
[
:,
:,
idxs
[
w
+
1
],
6
:]
if
self
.
nweb
>
0
:
# circumvent if no webs are present
self
.
node_u_web
=
np
.
zeros
(
(
self
.
ncase
,
self
.
nweb
,
self
.
nmode
,
self
.
nnode_web_max
,
2
))
for
w
in
range
(
self
.
nweb
):
self
.
node_u_web
[
:,
w
,
:,
:
self
.
nnode_web
[
w
]
-
1
,
:]
=
self
.
mode_shape
[:,
:,
idxs
[
w
]
+
1
:
idxs
[
w
+
1
]
+
1
,
4
:
6
]
# add second node of last element
self
.
node_u_web
[:,
w
,
:,
self
.
nnode_web
[
w
]
-
1
,
:]
=
self
.
mode_shape
[
:,
:,
idxs
[
w
+
1
],
6
:]
else
:
self
.
node_u_web
=
np
.
zeros
(
(
self
.
ncase
,
self
.
nweb
,
self
.
nmode
,
self
.
nnode_web_max
,
2
))
plot
=
False
if
plot
:
...
...
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