-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from M3Group/devel
Release for v0.7
- Loading branch information
Showing
52 changed files
with
101,187 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
[mesh] | ||
type=asfem | ||
dim=2 | ||
xmax=2.0 | ||
ymax=2.0 | ||
nx=50 | ||
ny=50 | ||
meshtype=quad4 | ||
[end] | ||
|
||
[dofs] | ||
name=ux uy | ||
[end] | ||
|
||
[elmts] | ||
[mysolids] | ||
type=mechanics | ||
dofs=ux uy | ||
mate=mymate | ||
[end] | ||
[end] | ||
|
||
[mates] | ||
[mymate] | ||
type=linearelastic | ||
params=210.0 0.3 | ||
// E nu | ||
[end] | ||
[end] | ||
|
||
[bcs] | ||
[fix] | ||
type=dirichlet | ||
dofs=ux uy | ||
value=0.0 | ||
boundary=bottom | ||
[end] | ||
[loading] | ||
type=cyclicdirichlet | ||
dofs=uy | ||
params= 0.0 0.0 0.1 0.1 0.2 0.0 0.3 0.2 | ||
boundary=top | ||
[end] | ||
[end] | ||
|
||
[timestepping] | ||
type=be | ||
dt=1.0e-5 | ||
dtmax=5.0e-2 | ||
time=3.5e-1 | ||
optiters=3 | ||
adaptive=true | ||
[end] | ||
|
||
[projection] | ||
scalarmate=vonMises | ||
rank2mate=stress | ||
[end] | ||
|
||
[job] | ||
type=transient | ||
debug=dep | ||
[end] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
*** This is an input file for the compressive neohookean model | ||
|
||
[mesh] | ||
type=asfem | ||
dim=2 | ||
xmax=5.0 | ||
ymax=5.0 | ||
nx=50 | ||
ny=50 | ||
meshtype=quad4 | ||
[end] | ||
|
||
|
||
|
||
[dofs] | ||
name=ux uy | ||
[end] | ||
|
||
[projection] | ||
scalarmate=vonMises effective_plastic_strain | ||
rank2mate=stress strain | ||
[end] | ||
|
||
[elmts] | ||
[mechanics] | ||
type=mechanics | ||
dofs=ux uy | ||
mate=myplastic | ||
domain=alldomain | ||
[end] | ||
[end] | ||
|
||
[mates] | ||
[myplastic] | ||
type=j2plasticity | ||
params=210.0 0.3 0.5 1.2 | ||
// E nu yield stress hardening modulus | ||
[end] | ||
[end] | ||
|
||
|
||
|
||
[bcs] | ||
[FixUx] | ||
type=dirichlet | ||
dofs=ux | ||
boundary=left right | ||
value=0.0 | ||
[end] | ||
[FixUy] | ||
type=dirichlet | ||
dofs=uy | ||
boundary=bottom | ||
value=0.0 | ||
[end] | ||
[loadUy] | ||
type=cyclicdirichlet | ||
dofs=uy | ||
params=0.0 0.0 0.2 0.2 0.3 0.0 0.4 0.4 0.5 -0.1 0.6 0.5 | ||
boundary=top | ||
[end] | ||
[end] | ||
|
||
[output] | ||
type=vtu | ||
interval=2 | ||
[end] | ||
|
||
[timestepping] | ||
type=be | ||
dt=2.0e-4 | ||
endtime=1.0e0 | ||
adaptive=true | ||
optiters=3 | ||
dtmax=1.0e-1 | ||
//dtmin=1.0e-12 | ||
[end] | ||
|
||
[job] | ||
type=transient | ||
debug=dep | ||
[end] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
*** This is an input file for the compressive neohookean model | ||
|
||
[mesh] | ||
type=asfem | ||
dim=2 | ||
xmax=5.0 | ||
ymax=5.0 | ||
nx=50 | ||
ny=50 | ||
meshtype=quad4 | ||
[end] | ||
|
||
|
||
|
||
[dofs] | ||
name=ux uy | ||
[end] | ||
|
||
[projection] | ||
scalarmate=vonMises effective_plastic_strain | ||
rank2mate=stress strain | ||
[end] | ||
|
||
[elmts] | ||
[mechanics] | ||
type=mechanics | ||
dofs=ux uy | ||
mate=myplastic | ||
domain=alldomain | ||
[end] | ||
[end] | ||
|
||
[mates] | ||
[myplastic] | ||
type=j2plasticity | ||
params=210.0 0.3 0.5 1.2 | ||
// E nu yield stress hardening modulus | ||
[end] | ||
[end] | ||
|
||
|
||
|
||
[bcs] | ||
[FixUx] | ||
type=dirichlet | ||
dofs=ux | ||
boundary=left right | ||
value=0.0 | ||
[end] | ||
[FixUy] | ||
type=dirichlet | ||
dofs=uy | ||
boundary=bottom | ||
value=0.0 | ||
[end] | ||
[loadUx] | ||
type=dirichlet | ||
dofs=uy | ||
value=1.0*t | ||
boundary=top | ||
[end] | ||
[end] | ||
|
||
[output] | ||
type=vtu | ||
interval=5 | ||
[end] | ||
|
||
[timestepping] | ||
type=be | ||
dt=2.0e-4 | ||
endtime=1.0e0 | ||
adaptive=true | ||
optiters=3 | ||
dtmax=1.0e-1 | ||
//dtmin=1.0e-12 | ||
[end] | ||
|
||
[job] | ||
type=transient | ||
debug=dep | ||
[end] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
''' | ||
This script is used for the input file generation of | ||
polycrystalline structe. It will ouput the [mates] and [elmts] | ||
block for AsFem. | ||
@author: Yang Bai | ||
@Date : 2021.11.07 | ||
@Usage : PolyGrains.py -grains 5 | ||
''' | ||
import numpy as np | ||
import sys | ||
|
||
LambdaVec=121.15;muVec=80.77 | ||
|
||
|
||
|
||
|
||
Gc=2.7e-3;L=0.012;viscosity=1.0e-6 | ||
|
||
nGrains=250 | ||
i=0 | ||
for name in sys.argv: | ||
if '-grains' in name: | ||
if i+1<len(sys.argv): | ||
nGrains=int(sys.argv[i+1]) | ||
if nGrains<1: | ||
nGrains=1 | ||
i+=1 | ||
################################### | ||
### for random euler angles | ||
################################### | ||
#LambdaVec=np.random.rand(nGrains)*121.15 | ||
muVec=np.random.rand(nGrains)*80.77 | ||
|
||
LambdaVec=np.random.normal(121.15, 30, nGrains) | ||
muVec =np.random.normal(80.77, 25, nGrains) | ||
################################### | ||
filename='polygrainsE.txt' | ||
inp=open(filename,'w') | ||
|
||
########################## | ||
### for [elmts] block | ||
########################## | ||
inp.write('[elmts]\n') | ||
for i in range(nGrains): | ||
str =' [myelmt%d]\n'%(i+1) | ||
str+=' type=miehefrac\n' | ||
str+=' dofs=d ux uy uz\n' | ||
str+=' mate=mymate%d\n'%(i+1) | ||
str+=' domain=%d\n'%(i+1) | ||
str+=' [end]\n' | ||
inp.write(str) | ||
inp.write('[end]\n\n\n') | ||
|
||
################################# | ||
### for [mates] block | ||
################################# | ||
inp.write('[mates]\n') | ||
str='' | ||
for i in range(nGrains): | ||
k=LambdaVec[i];mu=muVec[i] | ||
str+=' [mymate%d]\n'%(i+1) | ||
str+=' type=miehefracmate\n' | ||
str+=' params=%11.4e %11.4e %11.4e %11.4e %11.4e\n'%(k,mu,Gc,L,viscosity) | ||
str+=' [end]\n' | ||
str+='[end]\n' | ||
inp.write(str) |
Oops, something went wrong.