MeshSolve and DisplaceMesh

Numerical methods and mathematical models of Elmer
Post Reply
kaputo
Posts: 3
Joined: 03 Feb 2017, 17:58
Antispam: Yes

MeshSolve and DisplaceMesh

Post by kaputo »

Hi I tried to do a simple example were the mesh is Displaced in each Step of the Simulation.
Therefore I made a simple Cylinder mesh and used the StressSolver and the MeshSolver. The StressSolver works well but the MeshSolver does not seem to change the Mesh at all.

Here I will post a part of my Sif file:
Solver 1 is the StresSolver which does not do anything at the moment, because I want to resolve the Issue with the MeshSolver first.
Solver 3 is the ResultOutputSolver so i can see the result in paraview.
I have therefore not inculded them.

Code: Select all

Simulation
  !-----------------OutPut-----------------
  Max Output Level = 20
  Coordinate System = Cartesian
  Simulation Type = Transient
  !-----------------Iterations-----------------
  Steady State Max Iterations  = 10
  Steady State Min Iterations = 1
  !-----------------Time Intervals-----------------
  Timestep Intervals = 100
  Timestep Size = real 1 
  !adaptive_in_time=Logical False !Logical True
  !-----------------Numerical Parameters-----------------
  tolerance=real 1.0e-07 !tolerance for checking if to points are diffrent must be significantly smaller then the samllest Material
  !-----------------Jellyroll Parameters-----------------

End

Equation 1
 Active Solvers (3) = 1 2 3
 Stress Analysis = Logical true
End

! MATERIALS
Material 1
  Name = "Copper (generic)"
  Heat expansion Coefficient = 16.5e-6
  Heat Conductivity = 401.0
  Sound speed = 3810.0
  Heat Capacity = 385.0
  Mesh Poisson ratio = 0.34
  Density = 8960.0
  Poisson ratio = 0.34
  Youngs modulus = 115.0e9
End

Solver 2
  Equation = Mesh Update
  Variable = -dofs 3 Mesh Update
  Procedure = "MeshSolve" "MeshSolver"
  Exec Solver = Always
  Stabilize = True
  Bubbles = False
  Lumped Mass Matrix = False
  Optimize Bandwidth = True
  Steady State Convergence Tolerance = 1.0e-5
  Nonlinear System Convergence Tolerance = 1.0e-7
  Nonlinear System Max Iterations = 20
  Nonlinear System Newton After Iterations = 3
  Nonlinear System Newton After Tolerance = 1.0e-3
  Nonlinear System Relaxation Factor = 1
  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStab
  Linear System Max Iterations = 500
  Linear System Convergence Tolerance = 1.0e-10
  BiCGstabl polynomial degree = 2
  Linear System Preconditioning = Diagonal
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = False
  Linear System Residual Output = 1
  Linear System Precondition Recompute = 1
End

Boundary Condition 1
!====== Displacement on -y =====
  Target Boundaries(1) = 1
  Displacement 1=0
  Displacement 2=0
  Displacement 3=0
  
  Mesh Update 1=0
  Mesh Update 2=0
  Mesh Update 3=0

End

Boundary Condition 2
!====== Displacement on Zylinder Mantel =====
  Target Boundaries(1) = 3
  Displacement 1=0
  Displacement 2=0
  Displacement 3=0
  
  Mesh Update 1=0
  Mesh Update 2=0
  Mesh Update 3=0

End

Boundary Condition 3
!====== Displacement on y+ =====
  Target Boundaries(1) = 2
  Normal Force = real 1e6
  
  Mesh Update 1= real 0.0 
  Mesh Update 2= real 1 
  Mesh Update 3= real 0.0 
  !Mesh Update 1= Equals Displacement 1 
  !Mesh Update 2= Equals Displacement 2
  !Mesh Update 3= Equals Displacement 3
End
One problem which might be part of this might be that the DisplaceMesh function (which should be defined in MeshUtils) is not defined anywhere.

I would really appreciate some help. I Do not know what i am doing wrong.
Kaputo
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: MeshSolve and DisplaceMesh

Post by raback »

H Kaputo,

What is the intention of using MeshUpdate?

Typically the mesh update solver is complementary solver for the displacements solver. For example, In FSI the structure is solved by some elasticity solver and the MeshUpdate solver is used to extend the deformations in a continuous way to the fluid domain. Hence the MeshUpdate and StressSolver should be active in complementary domains. Now they are active at the same domains as they are listed in the same Equation block.

-Peter
kaputo
Posts: 3
Joined: 03 Feb 2017, 17:58
Antispam: Yes

Re: MeshSolve and DisplaceMesh

Post by kaputo »

Hi Peter

In the future i want to deforme a body depending on internal Temperature. But for the beginning i wanted to test the elasticity solver and the deformation of a mesh. I will explain my process and maybe it makes sense.
1. It used the StressSolver to calculate the deformation with an external fixed force (in this case a stretching in the y direction). This worked
2. I wanted to deform the body accurately based on the Displacement calculated by the StressSolver, I used the the Keyword

Code: Select all

Displace Mesh= Logical True
3. This had no effect i could see. That means my vtu output stayed the same.
4. After that I tried a different Solver to do the deformation, i found the MeshSolver and used

Code: Select all

Mesh Update 1= Equals Displacement 1 
Mesh Update 2= Equals Displacement 2
Mesh Update 3= Equals Displacement 3

This had noeffect on my vtu file either.
5. After That i tried a fixed deformation with

Code: Select all

  Mesh Update 1= real 0.0 
  Mesh Update 2= real 1 
  Mesh Update 3= real 0.0 
The stressSolver is still active but it does no interact with the MeshSolver at the moment. This is not the intended result this was only done to isolate the error.

Niels
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: MeshSolve and DisplaceMesh

Post by raback »

Hi

Sorry, this type of coupling between MeshSolver and StressSolver cannot be done as they are treated as complementary. For example, in VTU output MeshUpdate is saved where Displacement is not active to the same field.

Maybe your displacement is too small to see? In Paraview there is the filter "warp by vector" which can also be usefull.

-Peter
kaputo
Posts: 3
Joined: 03 Feb 2017, 17:58
Antispam: Yes

Re: MeshSolve and DisplaceMesh

Post by kaputo »

Hi

You were right the Displacement was to small. Thank you for your help.

For everyone else how tries this i am now using this:

Code: Select all

Solver 1
  Equation = string "StressSolver"
  Procedure ="StressSolve" "StressSolver"
  Exec Solver =Before Timestep
   
  Variable = String "Displacement"
  Variable DOFs = Integer 3
  Displace Mesh = Logical True
  Calculate Strains =Logical True
  Calculate Stresses =Logical True

  Constant Bulk System = Logical false
  Update Transient System = Logical true

  Linear System Solver = Iterative
  Linear System Symmetric = Logical True
  Linear System Scaling = Logical False
  Linear System Iterative Method = CG
  Linear System Direct Method = UMFPACK
  Linear System Convergence Tolerance = 1.0e-8
  Linear System Max Iterations = 200
  Linear System Preconditioning = ILU4

  Nonlinear System Convergence Tolerance = Real 1.0e-7
  Nonlinear System Max Iterations = Integer 1
  !Nonlinear System Relaxation Factor = Real 1

  Steady State Convergence Tolerance= 1.0e-6
  Optimize Bandwidth = True 
   

End

Boundary Condition 1
!====== Displacement on -y =====
  Target Boundaries(1) = 1
  Displacement 1=0
  Displacement 2=0
  Displacement 3=0
End


Boundary Condition 2
!====== Displacement on y+ =====
  Target Boundaries(1) = 2
  Normal Force = real 1e11
End  

Body Force 1
  Stress Bodyforce 1= real 0.0
  Stress Bodyforce 2= real 1e9
  Stress Bodyforce 3= real 0.0
  
  Stress Load = real 0.0
  Strain Load = real 0.0
End
Niels
Post Reply