Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-microstructure
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
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
Klaus Böhnlein
dune-microstructure
Commits
ab953204
Commit
ab953204
authored
1 year ago
by
Klaus Böhnlein
Browse files
Options
Downloads
Patches
Plain Diff
update/cleanup parametrized_laminate
parent
db1b2ced
Branches
Branches containing commit
No related tags found
1 merge request
!13
Feature: IndexedMicrostructure (Definition of individual macroscopic microstructure-phases)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
experiment/parametrized_laminate.py
+14
-0
14 additions, 0 deletions
experiment/parametrized_laminate.py
test/parametrized_laminate.py
+31
-83
31 additions, 83 deletions
test/parametrized_laminate.py
with
45 additions
and
83 deletions
experiment/parametrized_laminate.py
+
14
−
0
View file @
ab953204
...
@@ -7,6 +7,20 @@ class ParameterSet(dict):
...
@@ -7,6 +7,20 @@ class ParameterSet(dict):
parameterSet
=
ParameterSet
()
parameterSet
=
ParameterSet
()
""""
Experiment: Parametrized laminate composite with isotopic material and vanishing Poisson ratio.
extensively used in
[Böhnlein,Neukamm,Padilla-Garza,Sander - A homogenized bending theory for prestrained plates]
https://link.springer.com/article/10.1007/s00332-022-09869-8
theta: width of center material
theta_rho: ratio between the prestrain of the fibres.
theta_mu: ratio between lema
"""
#############################################
#############################################
# Paths
# Paths
#############################################
#############################################
...
...
This diff is collapsed.
Click to expand it.
test/parametrized_laminate.py
+
31
−
83
View file @
ab953204
...
@@ -7,10 +7,23 @@ class ParameterSet(dict):
...
@@ -7,10 +7,23 @@ class ParameterSet(dict):
parameterSet
=
ParameterSet
()
parameterSet
=
ParameterSet
()
""""
Experiment: Parametrized laminate composite with isotopic material and vanishing Poisson ratio.
extensively used in
[Böhnlein,Neukamm,Padilla-Garza,Sander - A homogenized bending theory for prestrained plates]
https://link.springer.com/article/10.1007/s00332-022-09869-8
theta: width of center material
theta_rho: ratio between the prestrain of the fibres.
theta_mu: ratio between lema
"""
#############################################
#############################################
# Paths
# Paths
#############################################
#############################################
#parameterSet.
outpu
tPath = '/home/klaus/Desktop/Dune_
release
/dune-microstructure/outputs'
#
parameterSet.
resul
tPath = '/home/klaus/Desktop/Dune_
bendIso
/dune-microstructure/outputs
_parametrized_laminate
'
parameterSet
.
baseName
=
'
parametrized_laminate
'
#(needed for Output-Filename)
parameterSet
.
baseName
=
'
parametrized_laminate
'
#(needed for Output-Filename)
#############################################
#############################################
...
@@ -18,97 +31,31 @@ parameterSet.baseName= 'parametrized_laminate' #(needed for Output-Filename)
...
@@ -18,97 +31,31 @@ parameterSet.baseName= 'parametrized_laminate' #(needed for Output-Filename)
#############################################
#############################################
#Parameters used:
#Parameters used for analytical solutions:
theta
=
0.25
;
# theta = 0.5
mu_1
=
1.0
;
# mu_1 = 1.0;
theta_mu
=
2.0
;
# theta_mu = 10.0
mu_2
=
theta_mu
*
mu_1
;
# mu_2 = theta_mu * mu_1;
rho_1
=
1.0
;
# rho_1 = 1.0;
theta_rho
=
2.0
;
# theta_rho = 10.0
rho_2
=
rho_1
*
theta_rho
;
# rho_2 = rho_1*theta_rho;
## Should be deprecated:
# # --- Choose scale ratio gamma:
# parameterSet.gamma = 1.0
# # --- Number of material phases
# parameterSet.Phases = 4
# #--- Indicator function for material phases
# def indicatorFunction(x):
# theta=0.25
# factor=1
# if (abs(x[0]) < (theta/2) and x[2] < 0 ):
# return 1 #Phase1
# elif (abs(x[0]) > (theta/2) and x[2] > 0 ):
# return 2 #Phase2
# elif (abs(x[0]) < (theta/2) and x[2] > 0 ):
# return 3 #Phase3
# else :
# return 4 #Phase4
# ########### Options for material phases: #################################
# # 1. "isotropic" 2. "orthotropic" 3. "transversely_isotropic" 4. "general_anisotropic"
# #########################################################################
# ## Notation - Parameter input :
# # isotropic (Lame parameters) : [mu , lambda]
# # orthotropic : [E1,E2,E3,G12,G23,G31,nu12,nu13,nu23] # see https://en.wikipedia.org/wiki/Poisson%27s_ratio with x=1,y=2,z=3
# # transversely_isotropic : [E1,E2,G12,nu12,nu23]
# # general_anisotropic : full compliance matrix C
# ######################################################################
# #--- Define different material phases:
# #- PHASE 1
# parameterSet.phase1_type="isotropic"
# materialParameters_phase1 = [2.0, 0]
# #- PHASE 2
# parameterSet.phase2_type="isotropic"
# materialParameters_phase2 = [1.0, 0]
# #- PHASE 3
# parameterSet.phase3_type="isotropic"
# materialParameters_phase3 = [2.0, 0]
# #- PHASE 4
# parameterSet.phase4_type="isotropic"
# materialParameters_phase4 = [1.0, 0]
# #--- Define prestrain function for each phase (also works with non-constant values)
# def prestrain_phase1(x):
# return [[2, 0, 0], [0,2,0], [0,0,2]]
# def prestrain_phase2(x):
# return [[1, 0, 0], [0,1,0], [0,0,1]]
# def prestrain_phase3(x):
# return [[0, 0, 0], [0,0,0], [0,0,0]]
# def prestrain_phase4(x):
# return [[0, 0, 0], [0,0,0], [0,0,0]]
class
Microstructure
:
class
Microstructure
:
def
__init__
(
self
):
def
__init__
(
self
):
# self.macroPoint = macroPoint
self
.
gamma
=
1.0
self
.
gamma
=
1.0
#in the future this might change depending on macroPoint.
self
.
phases
=
4
self
.
phases
=
4
#in the future this might change depending on macroPoint.
#--- Define different material phases:
#--- Define different material phases:
theta_mu
=
2.0
#- PHASE 1
#- PHASE 1
self
.
phase1_type
=
"
isotropic
"
self
.
phase1_type
=
"
isotropic
"
self
.
materialParameters_phase1
=
[
2
.0
,
0
]
self
.
materialParameters_phase1
=
[
theta_mu
*
1
.0
,
0
]
#- PHASE 2
#- PHASE 2
self
.
phase2_type
=
"
isotropic
"
self
.
phase2_type
=
"
isotropic
"
self
.
materialParameters_phase2
=
[
1.0
,
0
]
self
.
materialParameters_phase2
=
[
1.0
,
0
]
#- PHASE 3
#- PHASE 3
self
.
phase3_type
=
"
isotropic
"
self
.
phase3_type
=
"
isotropic
"
self
.
materialParameters_phase3
=
[
2
.0
,
0
]
self
.
materialParameters_phase3
=
[
theta_mu
*
1
.0
,
0
]
#- PHASE 4
#- PHASE 4
self
.
phase4_type
=
"
isotropic
"
self
.
phase4_type
=
"
isotropic
"
self
.
materialParameters_phase4
=
[
1.0
,
0
]
self
.
materialParameters_phase4
=
[
1.0
,
0
]
...
@@ -131,7 +78,8 @@ class Microstructure:
...
@@ -131,7 +78,8 @@ class Microstructure:
#--- Define prestrain function for each phase (also works with non-constant values)
#--- Define prestrain function for each phase (also works with non-constant values)
def
prestrain_phase1
(
self
,
x
):
def
prestrain_phase1
(
self
,
x
):
return
[[
2
,
0
,
0
],
[
0
,
2
,
0
],
[
0
,
0
,
2
]]
theta_rho
=
2.0
return
[[
theta_rho
*
1.0
,
0
,
0
],
[
0
,
theta_rho
*
1.0
,
0
],
[
0
,
0
,
theta_rho
*
1.0
]]
def
prestrain_phase2
(
self
,
x
):
def
prestrain_phase2
(
self
,
x
):
return
[[
1
,
0
,
0
],
[
0
,
1
,
0
],
[
0
,
0
,
1
]]
return
[[
1
,
0
,
0
],
[
0
,
1
,
0
],
[
0
,
0
,
1
]]
...
@@ -194,5 +142,5 @@ parameterSet.write_checkOrthogonality = 1
...
@@ -194,5 +142,5 @@ parameterSet.write_checkOrthogonality = 1
# --- Print Condition number of matrix (can be expensive):
# --- Print Condition number of matrix (can be expensive):
#parameterSet.print_conditionNumber= 1 #(default=false)
#parameterSet.print_conditionNumber= 1 #(default=false)
# --- write effective quantities
to Matlab-folder for symbolic minimization:
# --- write effective quantities
(Qhom.Beff) to .txt-files
#
parameterSet.write_
toMATLAB = 0 # writes e
ffective
q
uantities
to .txt-files QMatrix.txt and BMatrix.txt
parameterSet
.
write_
E
ffective
Q
uantities
ToTxt
=
False
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