advice on simple FSI calculation

Numerical methods and mathematical models of Elmer
Post Reply
felixelmer
Posts: 9
Joined: 30 Nov 2020, 16:19
Antispam: Yes

advice on simple FSI calculation

Post by felixelmer »

Dear Elmer gurus,

Learning as a new user of ELMER, I mocked up a simple 2D FSI model that uses the N-S, Mesh Update and Elastic solvers. The sif file (attached below) describes uniform fluid flow in the x-direction in a rectangular domain, with a free (non-fixed) elastic cylinder inside the domain that gets advected with the flow. For now, I'm just interested in the steady-state stress field; I'll explore transient motion later. Although the code runs, it gives the solution with the cylinder fixed in space, instead of freely moving with the flow. I suspect that I have set up "Boundary Condition 4" (at the cylinder perimeter) and/or Mesh Update or Mesh Velocity incorrectly. I would appreciate your advice on how to simulate a free-moving elastic body correctly. Many thanks!

Best wishes,
Felix

Code: Select all


check keywords warn
echo on

! Name of run and output files
$Run = "1"

Header
  Mesh DB "." "play0"
End

Simulation
  Coordinate System = "Cartesian 2D"
  Simulation Type = "Steady"
  Output Intervals = 1
  Steady State Max Iterations = 50
  Output File = "fsi_test_$Run".result"
  Post File = "fsi_test_$Run".vtu"
  Max Output Level = 4
End

Body 1
  Target Bodies(1) = 1
  Name = "Fluid"
  Equation = 1
  Material = 1
  Initial Condition = 1
End

Equation 1
  Name = "Equation1"
  Active Solvers(2) = 1 2
End

Material 1
  Density = 1000
  Viscosity = 10.0
End

Initial Condition 1
  Velocity 1 = 0.5
  Velocity 2 = 0.0
  Pressure = 0.0
End

!----------------------------------------
Body 2
  Target Bodies(1) = 2
  Name = "Blob"
  Equation = 2
  Material = 2
  Body Force = 1
  Initial Condition = 1
End

Equation 2
  Name = "Equation2"
  Active Solvers(1) = 3
End

Material 2
  Name = "Elastic blob"
  Density = 1000 
  Poisson Ratio = 0.25
  Youngs Modulus = 40e3
End

Body Force 1
  Flow BodyForce 1 = Real 9.8                          
  Flow BodyForce 2 = Real 0.0
End


!----------------------------------------
Solver 1
  Equation = "Navier-Stokes"
  Stabilization Method = Stabilized 
  Flow Model = Stokes
  
  Linear System Solver = Direct
  Linear System Direct Method = "UMFPACK"     
  Nonlinear System Convergence Tolerance = 1.0E-05
  Nonlinear System Max Iterations = 50
  Nonlinear System Newton After Iterations = 5
  Nonlinear System Newton After Tolerance =  1.0E-02 
  Nonlinear System Relaxation Factor = 1.0
  Steady State Convergence Tolerance = 1.0E-03
End

Solver 2
  Equation = "Mesh Update"
  Variable = -dofs 2 Mesh Velocity
  Procedure = "MeshSolve" "MeshSolver"
  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStab
  Linear System Max Iterations = 500
  Linear System Convergence Tolerance = 1.0e-8
  Linear System Preconditioning = ILU0
  Steady State Convergence Tolerance = 1.0e-4
End

Solver 3
  Equation = "blob elasticity"
  Variable = -dofs 2 Displacement
  Procedure = "ElasticSolve" "ElasticSolver"
  Linear System Solver = Direct
  Linear System Direct Method = Banded
  Nonlinear System Convergence Tolerance = 1.0e-7
  Nonlinear System Max Iterations = 10
  Nonlinear System Newton After Iterations = 3
  Nonlinear System Newton After Tolerance = 1.0e-3
  Nonlinear System Relaxation Factor = 1.0
  Steady State Convergence Tolerance = 1.0e-4
End

Boundary Condition 1
  Name = "top of domain"
  Target Boundaries = 1
  Velocity 1 = Real 0.5e0
  Velocity 2 = Real 0.0e0
End

Boundary Condition 2
  Name = "sides"
  Target Boundaries(2) = 3 4
  Velocity 1 = Real 0.50e0
  Velocity 2 = Real 0.0e0
End

Boundary Condition 3
  Name = "bottom of domain"
  Target Boundaries = 2
  Velocity 1 = Real 0.5e0
  Velocity 2 = Real 0.0e0
End

! FSI boundary
Boundary Condition 4
  Name = "blob perim"
  Target Boundaries = 5
  Velocity 1 = Equals Mesh Velocity 1
  Velocity 2 = Equals Mesh Velocity 2
End

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

Re: advice on simple FSI calculation

Post by raback »

Hi

Have you studied the test cases "fsi_beam" (with continuous BCs) or "fsi_beam_nodalforce" (with nodal BCs)?

As you describe the case to me it probably does not have a steady state solution. Even the transient solution may be difficult to find.

Were you asking about this in some other forum? If you're looking for steady state location for the elastic blob it is not really worth to study it as a FSI problem. Rather than looking for force->displacement look it as displacement->force problem.

-Peter
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: advice on simple FSI calculation

Post by kevinarden »

ElasticSolver does not much like an unrestrained body, may be possible in transient if the time steps are small. Some use soft spring elements to tie the body to ground, which improves the mathmatical soultion significantly.
felixelmer
Posts: 9
Joined: 30 Nov 2020, 16:19
Antispam: Yes

Re: advice on simple FSI calculation

Post by felixelmer »

Hi Peter and Kevin (kevinarden),

Thank you so much for your prompt and helpful replies. I much appreicate your thoughts.

Peter: I haven't posted on the topic before (I just joined today!) but have seen several posts from a few years ago related to the problem. My FSI run is merely a test case for building something complicated, so I'm not seeking the steady-state solution, and mainly wish to make sure that I've grasped the coding for FS coupling (Elmer is new to me).

Kevin: Thanks! It is useful to know that ElasticSolver could struggle in such situation. I'm learning now!

I have now tried transient runs, with small timesteps (variously experimenting with 50 steps of dt = 1e-4 to 1e-1). What is surprising is that the runs don't show any changes/evolution of any kind. In fact, Paraview shows that:
(i) all components of Mesh Displacement and Mesh Velocity are zero --- whether in the "steady-state" or the transient runs.
(ii) the solution which I am getting is identical to the solution where the cylinder is fixed (no MeshUpdate, no ElasticSolver, and zero fluid velocity on the cylinder perimeter).

Thus, I must have made elementary mistake(s) in the sif file (e.g. in the use of MeshUpdate and the BC), as Elmer hasn't detected that I'm trying to get the cylinder to respond/couple to the fluid. If you can spot the mistakes, please let me know!

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

Re: advice on simple FSI calculation

Post by raback »

Hi Felix,

First of all, you need 3 BCs at the FSI interface instead of 1. Mesh update must follow displacements, fluid velocity follows Mesh Velocity, and force on object needs traction from N-S. In steady state it simplifies to:

https://github.com/ElmerCSC/elmerfem/bl ... am/fsi.sif

As said, your system cannot have a steady state solution as for now.

-Peter
felixelmer
Posts: 9
Joined: 30 Nov 2020, 16:19
Antispam: Yes

Re: advice on simple FSI calculation

Post by felixelmer »

Hi Peter,

Many thanks for your advice, and giving me the sample sif file!

Best wishes, Felix
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: advice on simple FSI calculation

Post by kevinarden »

I worked through a case of an unrestrained solid subjected to FSI in a fluid
viewtopic.php?f=18&t=7279
Post Reply