Skip to content

Commit

Permalink
Add ALE test case (#93)
Browse files Browse the repository at this point in the history
* adding ale pipe test

* adapting test to svFSI+ format

* modify test file

* changing reference to orginal svFSI output

* removing non-lfs files

* adding test as lfs compatible

* adding files for 1 timestep check

* modifying test ale for 1 timestep

* modifying test ale for 1 timestep

* make FSI mesh much coarser

* remove fine mesh results

* give more meaningful error message

* run 5 steps

* add int32 coarse meash

* also test pressure and velocity

---------

Co-authored-by: Erica <schwarze@stanford.edu>
Co-authored-by: Erica Leigh Schwarz <schwarze@exp-9-56.expanse.sdsc.edu>
  • Loading branch information
3 people committed Sep 11, 2023
1 parent 8c71ad3 commit 9146764
Show file tree
Hide file tree
Showing 16 changed files with 382 additions and 3 deletions.
23 changes: 23 additions & 0 deletions tests/cases/ale_3d_pipe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

# **Problem Description**

Solve pressure wave propagation in an arterial model using the Arbitrary Lagrangian-Eulerian method [1]. The problem set-up is as follows.

<p align="center">
<img src="./configuration.png" width="600">
</p>

And the results are

<p align="center">
<img src="./results.gif" width="600">
</p>

The input file `svFSI.xml` follows the input file format for svFSIplus. More on ALE-FSI simulations can be found here:

- SimVascular Website: https://simvascular.github.io/docssvFSI-FSI.html
- Youtube Tutorial: https://www.youtube.com/watch?v=QIpyThIAD7k

## Reference

1. Liu, Ju, and Alison L. Marsden. A Unified Continuum and Variational Multiscale Formulation for Fluids, Solids, and Fluid Structure Interaction. *Computer Methods in Applied Mechanics and Engineering* 337 (August 2018): 549 97. https://doi.org/10.1016/j.cma.2018.03.045.
Binary file added tests/cases/ale_3d_pipe/configuration.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions tests/cases/ale_3d_pipe/mesh/fluid/mesh-complete.mesh.vtu
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/ale_3d_pipe/mesh/fluid/mesh-surfaces/end.vtp
Git LFS file not shown
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/ale_3d_pipe/mesh/fluid/mesh-surfaces/start.vtp
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/ale_3d_pipe/mesh/solid/mesh-complete.mesh.vtu
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/ale_3d_pipe/mesh/solid/mesh-surfaces/end.vtp
Git LFS file not shown
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/ale_3d_pipe/mesh/solid/mesh-surfaces/outside.vtp
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/ale_3d_pipe/mesh/solid/mesh-surfaces/start.vtp
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/ale_3d_pipe/result_005.vtu
Git LFS file not shown
Binary file added tests/cases/ale_3d_pipe/results.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
155 changes: 155 additions & 0 deletions tests/cases/ale_3d_pipe/svFSI.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
#----------------------------------------------------------------
# General simulation parameters

Continue previous simulation: 0
Number of spatial dimensions: 3
Number of time steps: 80
Time step size: 1e-4
Spectral radius of infinite time step: 0.50
Searched file name to trigger stop: STOP_SIM

Save results to VTK format: 1
Name prefix of saved VTK files: result
Increment in saving VTK files: 1
Start saving after time step: 1

Increment in saving restart files: 1
Convert BIN to VTK format: 0

Verbose: 1
Warning: 0
Debug: 0

#----------------------------------------------------------------
# Mesh data
Add mesh: lumen {
Mesh file path: mesh/fluid/mesh-complete.mesh.vtu
Add face: lumen_inlet {
Face file path: mesh/fluid/mesh-surfaces/start.vtp
}
Add face: lumen_outlet {
Face file path: mesh/fluid/mesh-surfaces/end.vtp
}
Add face: lumen_wall {
Face file path: mesh/fluid/mesh-surfaces/interface.vtp
}
Domain: 0
}

Add mesh: wall {
Mesh file path: mesh/solid/mesh-complete.mesh.vtu
Add face: wall_inlet {
Face file path: mesh/solid/mesh-surfaces/start.vtp
}
Add face: wall_outlet {
Face file path: mesh/solid/mesh-surfaces/end.vtp
}
Add face: wall_inner {
Face file path: mesh/solid/mesh-surfaces/interface.vtp
}
Add face: wall_outer {
Face file path: mesh/solid/mesh-surfaces/outside.vtp
}
Domain: 1
}

#----------------------------------------------------------------
# Projections
Add projection: wall_inner {
Project from face: lumen_wall
}

#----------------------------------------------------------------
# Equations
Add equation: FSI {
Coupled: 1
Min iterations: 1
Max iterations: 10
Tolerance: 1e-6

Domain: 0 {
Equation: fluid
Density: 1.0
Viscosity: Constant {Value: 0.04}
Backflow stabilization coefficient: 0.2
}

Domain: 1 {
Equation: struct # (or) ustruct
Constitutive model: nHK
Dilational penalty model: M94
Density: 1.0
Elasticity modulus: 1.0e7
Poisson ratio: 0.3

##### For ustruct eq.
## Momentum stabilization coefficient: 0.001
## Continuity stabilization coefficient: 0.0
}

LS type: GMRES {
# Preconditioner: Trilinos-ILUT
Tolerance: 1e-6
Max iterations: 100
Krylov space dimension: 50
}

Output: Spatial {
Displacement: t
Velocity: t
Pressure: t
}

Output: Alias {
Displacement: FS_Displacement
}

Add BC: lumen_inlet {
Type: Neu
Value: 5.0e4
}

Add BC: wall_inlet {
Type: Dir
Value: 0.0
Impose on state variable integral: t
Zero out perimeter: f
Effective direction: (0, 0, 1)
}

Add BC: wall_outlet {
Type: Dir
Value: 0.0
Impose on state variable integral: t
Zero out perimeter: f
Effective direction: (0, 0, 1)
}
}

Add equation: mesh {
Coupled: 1
Min iterations: 1
Max iterations: 5
Tolerance: 1e-4
Poisson ratio: 0.3

LS type: CG {
Preconditioner: FSILS
Tolerance: 1e-4
}

Output: Spatial {
Displacement: t
}

Add BC: lumen_inlet {
Type: Dir
Value: 0.0
}

Add BC: lumen_outlet {
Type: Dir
Value: 0.0
}
}

153 changes: 153 additions & 0 deletions tests/cases/ale_3d_pipe/svFSI.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8" ?>
<svFSIFile version="0.1">

<GeneralSimulationParameters>
<Continue_previous_simulation> 0 </Continue_previous_simulation>
<Number_of_spatial_dimensions> 3 </Number_of_spatial_dimensions>
<Number_of_time_steps> 5 </Number_of_time_steps>
<Time_step_size> 1e-4 </Time_step_size>
<Spectral_radius_of_infinite_time_step> 0.50 </Spectral_radius_of_infinite_time_step>
<Searched_file_name_to_trigger_stop> STOP_SIM </Searched_file_name_to_trigger_stop>
<Save_results_to_VTK_format> true </Save_results_to_VTK_format>
<Name_prefix_of_saved_VTK_files> result </Name_prefix_of_saved_VTK_files>
<Increment_in_saving_VTK_files> 1 </Increment_in_saving_VTK_files>
<Start_saving_after_time_step> 1 </Start_saving_after_time_step>
<Increment_in_saving_restart_files> 1 </Increment_in_saving_restart_files>
<Convert_BIN_to_VTK_format> 0 </Convert_BIN_to_VTK_format>
<Verbose> 1 </Verbose>
<Warning> 0 </Warning>
<Debug> 0 </Debug>
</GeneralSimulationParameters>

<Add_mesh name="lumen" >
<Mesh_file_path> mesh/fluid/mesh-complete.mesh.vtu </Mesh_file_path>
<Add_face name="lumen_inlet">
<Face_file_path> mesh/fluid/mesh-surfaces/start.vtp </Face_file_path>
</Add_face>
<Add_face name="lumen_outlet">
<Face_file_path> mesh/fluid/mesh-surfaces/end.vtp </Face_file_path>
</Add_face>
<Add_face name="lumen_wall">
<Face_file_path> mesh/fluid/mesh-surfaces/interface.vtp </Face_file_path>
</Add_face>
<Domain> 0 </Domain>

</Add_mesh>

<Add_mesh name="wall" >
<Mesh_file_path> mesh/solid/mesh-complete.mesh.vtu </Mesh_file_path>
<Add_face name="wall_inlet">
<Face_file_path> mesh/solid/mesh-surfaces/start.vtp </Face_file_path>
</Add_face>
<Add_face name="wall_outlet">
<Face_file_path> mesh/solid/mesh-surfaces/end.vtp </Face_file_path>
</Add_face>
<Add_face name="wall_inner">
<Face_file_path> mesh/solid/mesh-surfaces/interface.vtp </Face_file_path>
</Add_face>
<Add_face name="wall_outer">
<Face_file_path> mesh/solid/mesh-surfaces/outside.vtp </Face_file_path>
</Add_face>
<Domain> 1 </Domain>
</Add_mesh>

<Add_projection name="wall_inner" >
<Project_from_face> lumen_wall </Project_from_face>
</Add_projection>

<Add_equation type="FSI" >
<Coupled> true </Coupled>
<Min_iterations> 1 </Min_iterations>
<Max_iterations> 10 </Max_iterations>
<Tolerance> 1e-6 </Tolerance>

<Domain id="0" >
<Equation> fluid </Equation>
<Density> 1.0 </Density>
<Viscosity model="Constant" >
<Value> 0.04 </Value>
</Viscosity>
<Backflow_stabilization_coefficient> 0.2 </Backflow_stabilization_coefficient>
</Domain>

<Domain id="1" >
<Equation> struct </Equation>
<Constitutive_model type="neoHookean"> </Constitutive_model>
<Dilational_penalty_model> M94 </Dilational_penalty_model>
<Density> 1.0 </Density>
<Elasticity_modulus> 1.0e7 </Elasticity_modulus>
<Poisson_ratio> 0.3 </Poisson_ratio>
</Domain>

<LS type="GMRES" >
<Preconditioner> FSILS </Preconditioner>
<!--Preconditioner> Trilinos-ILUT </Preconditioner-->
<Tolerance> 1e-6 </Tolerance>
<Max_iterations> 100 </Max_iterations>
<Krylov_space_dimension> 50 </Krylov_space_dimension>
</LS>

<Output type="Spatial" >
<Displacement> true </Displacement>
<Velocity> true </Velocity>
<Pressure> true </Pressure>
<VonMises_stress> true </VonMises_stress>
</Output>

<Output type="Alias" >
<Displacement> FS_Displacement </Displacement>
</Output>

<Add_BC name="lumen_inlet" >
<Type> Neu </Type>
<Value> 5.0e4 </Value>
</Add_BC>

<Add_BC name="wall_inlet" >
<Type> Dir </Type>
<Value> 0.0 </Value>
<Impose_on_state_variable_integral> true </Impose_on_state_variable_integral>
<Zero_out_perimeter> false </Zero_out_perimeter>
<Effective_direction> (0, 0, 1) </Effective_direction>
</Add_BC>

<Add_BC name="wall_outlet" >
<Type> Dir </Type>
<Value> 0.0 </Value>
<Impose_on_state_variable_integral> true </Impose_on_state_variable_integral>
<Zero_out_perimeter> false </Zero_out_perimeter>
<Effective_direction> (0, 0, 1 ) </Effective_direction>
</Add_BC>

</Add_equation>


<Add_equation type="mesh" >
<Coupled> true </Coupled>
<Min_iterations> 1 </Min_iterations>
<Max_iterations> 5 </Max_iterations>
<Tolerance> 1e-4 </Tolerance>
<Poisson_ratio> 0.3 </Poisson_ratio>

<LS type="CG" >
<Preconditioner> FSILS </Preconditioner>
<Tolerance> 1e-4 </Tolerance>
</LS>

<Output type="Spatial" >
<Displacement> true </Displacement>
</Output>

<Add_BC name="lumen_inlet" >
<Type> Dir </Type>
<Value> 0.0 </Value>
</Add_BC>

<Add_BC name="lumen_outlet" >
<Type> Dir </Type>
<Value> 0.0 </Value>
</Add_BC>

</Add_equation>

</svFSIFile>

0 comments on commit 9146764

Please sign in to comment.