Skip to content

Commit

Permalink
Merge pull request #54 from M3Group/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
yangbai90 authored Jan 10, 2022
2 parents 530c21c + cca7d7e commit e964887
Show file tree
Hide file tree
Showing 27 changed files with 132,317 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ __pycache__/
*.so

# for gmsh
*.msh
#.msh

# Distribution / packaging
.Python
Expand Down
104 changes: 104 additions & 0 deletions examples/mechanics/neohookean-2d.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
[mesh]
type=asfem
dim=2
xmax=2.0
ymax=2.0
nx=50
ny=50
meshtype=quad9
[end]

[qpoint]
type=gauss
order=4
[end]

[dofs]
name=ux uy
[end]

[elmts]
[mysolids]
type=mechanics
dofs=ux uy
mate=mymate
[end]
[end]

[mates]
[mymate]
type=neohookean
params=210.0 0.3
// E nu
[end]
[end]

[bcs]
[fixux]
type=dirichlet
dofs=ux
value=0.0
boundary=left
[end]
[fixuy]
type=dirichlet
dofs=uy
value=0.0
boundary=bottom
[end]
[loadinguy]
type=dirichlet
dofs=uy
value=1.0*t
boundary=top
[end]
[end]

[nonlinearsolver]
type=newton
maxiters=500
r_rel_tol=1.0e-12
r_abs_tol=6.0e-7
[end]

[timestepping]
type=be
dt=1.0e-5
dtmax=5.0e-1
//dtmin=5.0e-3
time=4.0e0
optiters=12
adaptive=true
[end]


[output]
type=vtu
interval=5
[end]

[projection]
scalarmate=vonMises
rank2mate=stress
[end]

[postprocess]
[uy]
type=sideintegral
dof=uy
side=top
[end]
[sigma_yy]
type=rank2matesideintegral
rank2mate=stress
iindex=2
jindex=2
side=top
[end]
[end]

[job]
type=transient
debug=dep
[end]

10 changes: 5 additions & 5 deletions examples/mechanics/neohookean-3d.i
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
dim=3
xmax=1.0
ymax=1.0
zmax=4.0
nx=10
ny=10
nz=50
zmax=2.0
nx=20
ny=20
nz=40
meshtype=hex8
[end]

Expand Down Expand Up @@ -61,7 +61,7 @@ name=ux uy uz
maxiters=200
r_rel_tol=1.0e-12
r_abs_tol=6.0e-7
solver=superlu
//solver=superlu
[end]

[timestepping]
Expand Down
24 changes: 12 additions & 12 deletions examples/mechanics/saintvenant-3d.i
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
dim=3
xmax=1.0
ymax=1.0
zmax=5.0
nx=5
ny=5
nz=25
zmax=2.0
nx=20
ny=20
nz=40
meshtype=hex8
[end]

Expand Down Expand Up @@ -52,26 +52,26 @@ name=ux uy uz

[nonlinearsolver]
type=newtonsecant
maxiters=200
maxiters=20
r_rel_tol=1.0e-12
r_abs_tol=6.0e-7
solver=superlu
//solver=superlu
[end]

[timestepping]
type=be
dt=5.0e-2
dtmax=5.0e-2
dtmin=5.0e-3
dt=2.0e-5
dtmax=5.0e-1
//dtmin=5.0e-3
time=2.0e0
optiters=7
adaptive=false
optiters=6
adaptive=true
[end]


[output]
type=vtu
interval=1
interval=5
[end]

[projection]
Expand Down
122 changes: 122 additions & 0 deletions examples/pffracture/neohookean-tensile-3d.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
[mesh]
type=asfem
dim=3
xmax=0.04
ymax=0.04
zmax=0.4
nx=10
ny=10
nz=100
meshtype=hex8
[end]

//[qpoint]
// type=gauss
// order=4
//[end]

[dofs]
name=d ux uy uz
[end]

[elmts]
[myfracture]
type=miehefrac
dofs=d ux uy uz
mate=myfracmate
[end]
[end]

[mates]
[myfracmate]
type=neohookeanpffracturemate
params=121.15 80.77 2.7e-3 0.002 1.0e-6
// lambda mu Gc L viscosity
[end]
[end]

[nonlinearsolver]
type=newtonsecant
maxiters=20
r_rel_tol=1.0e-10
r_abs_tol=5.5e-7
//solver=superlu
//solver=cg
[end]

[ics]
[constd]
type=const
dof=d
params=0.0
[end]
[end]

[output]
type=vtu
interval=1
[end]

[timestepping]
type=be
dt=1.0e-5
time=2.0e-1
adaptive=true
optiters=5
growthfactor=1.2
cutfactor=0.85
dtmax=1.0e-4
[end]

[projection]
scalarmate=vonMises
rank2mate=stress strain
[end]

[postprocess]
[uy]
type=sideintegral
dof=uz
side=top
[end]
[sigma_yy]
type=rank2matesideintegral
rank2mate=stress
iindex=2
jindex=2
side=top
[end]
[strain_yy]
type=rank2matesideintegral
rank2mate=strain
iindex=2
jindex=2
side=top
[end]
[end]

[bcs]
[fixux]
type=dirichlet
dofs=ux uy uz
value=0.0
boundary=back
[end]
[fixuy]
type=dirichlet
dofs=ux uy
value=0.2*t
boundary=front
[end]
[load]
type=dirichlet
dofs=uz
value=1.0*t
boundary=front
[end]
[end]

[job]
type=transient
debug=dep
[end]
2 changes: 1 addition & 1 deletion include/MateSystem/NeoHookeanMaterial.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ class NeoHookeanMaterial: public MechanicsMaterialBase{
private:
RankTwoTensor _GradU,_Strain,_Stress,_I,_devStress,_F;
RankTwoTensor _C,_Cinv,_pk2;
RankFourTensor _Jac;
RankFourTensor _Jac,_I4,_T4;
};
4 changes: 2 additions & 2 deletions include/NonlinearSolver/NonlinearSolverBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class NonlinearSolverBlock{
_RRelTol=1.0e-10;
_STol=0.0; // |dx|<|x|*stol
_PCTypeName="lu";
_LinearSolverName="default";
_LinearSolverName="default(cg)";
_CheckJacobian=false;
}

Expand All @@ -57,7 +57,7 @@ class NonlinearSolverBlock{
_RRelTol=1.0e-10;
_STol=0.0; // |dx|<|x|*stol
_PCTypeName="lu";
_LinearSolverName="default";
_LinearSolverName="default(cg)";
_CheckJacobian=false;
}
};
2 changes: 2 additions & 0 deletions include/Utils/RankFourTensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ class RankFourTensor{
//*** for push forward and pull back operator
RankFourTensor PushByF(const RankTwoTensor &F) const;
RankFourTensor PushForward(const RankTwoTensor &F) const;
//*** for conjugate dot Cijkl=Aijml*Smk
RankFourTensor ConjDot(const RankTwoTensor &a) const;
//**********************************************
//*** some setting functions
//**********************************************
Expand Down
Loading

0 comments on commit e964887

Please sign in to comment.