Skip to content

Commit

Permalink
Fluid and ustruct test cases (#115)
Browse files Browse the repository at this point in the history
Co-authored-by: Elena Martinez <elenasm@stanford.edu>
  • Loading branch information
elenasmartinez and Elena Martinez committed Oct 3, 2023
1 parent f7f99dc commit c14486e
Show file tree
Hide file tree
Showing 67 changed files with 1,417 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tests/cases/LV_Guccione_passive/load.dat
Git LFS file not shown
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/LV_Guccione_passive/mesh/mesh-complete.mesh.vtu
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/LV_Guccione_passive/mesh/mesh-surfaces/base.vtp
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/LV_Guccione_passive/mesh/mesh-surfaces/endo.vtp
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/LV_Guccione_passive/mesh/mesh-surfaces/epi.vtp
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/LV_Guccione_passive/result_001.vtu
Git LFS file not shown
97 changes: 97 additions & 0 deletions tests/cases/LV_Guccione_passive/svFSI.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?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> 1 </Number_of_time_steps>
<Time_step_size> 0.001 </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> 1 </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> 100 </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="msh" >

<Mesh_file_path> mesh/mesh-complete.mesh.vtu </Mesh_file_path>

<Add_face name="endo">
<Face_file_path> mesh/mesh-surfaces/endo.vtp </Face_file_path>
</Add_face>

<Add_face name="epi">
<Face_file_path> mesh/mesh-surfaces/epi.vtp </Face_file_path>
</Add_face>

<Add_face name="base">
<Face_file_path> mesh/mesh-surfaces/base.vtp </Face_file_path>
</Add_face>

<Fiber_direction> (1.0, 0.0, 0.0) </Fiber_direction>
<Fiber_direction> (0.0, 1.0, 0.0) </Fiber_direction>

</Add_mesh>


<Add_equation type="struct" >

<Coupled> true </Coupled>
<Min_iterations> 1 </Min_iterations>
<Max_iterations> 100 </Max_iterations>
<Tolerance> 1e-9 </Tolerance>

<Constitutive_model type="Gucci">
<c> 880 </c>
<bf> 8 </bf>
<bt> 6 </bt>
<bfs> 12 </bfs>
</Constitutive_model>

<Density> 1e-3 </Density>
<Elasticity_modulus> 1.0 </Elasticity_modulus>
<Poisson_ratio> 0.5 </Poisson_ratio>

<Dilational_penalty_model> ST91 </Dilational_penalty_model>
<Penalty_parameter> 1.0e6 </Penalty_parameter>

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

<LS type="BICG" >
<Preconditioner> FSILS </Preconditioner>
<Tolerance> 1e-9 </Tolerance>
<Max_iterations> 400 </Max_iterations>
</LS>

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

<Add_BC name="endo" >
<Type> Neu </Type>
<Time_dependence> Unsteady </Time_dependence>
<Temporal_values_file_path> load.dat </Temporal_values_file_path>
<Ramp_function> true </Ramp_function>
<Follower_pressure_load> true </Follower_pressure_load>
</Add_BC>

</Add_equation>

</svFSIFile>
35 changes: 35 additions & 0 deletions tests/cases/block_compression/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

# **Problem Description**

Solve block compression problem using displacement-based solid equation. The problem set-up is as follows [1]:

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

The final displacement is plotted below.

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

The input file `svFSI.inp` follows the master input file [`svFSI_master.inp`](./svFSI_master.inp) as a template. Some specific input options are discussed below:

## Directional Dirichlet BC

The problem configuration requires enforcing Dirichlet BC along a specific direction. For example, mesh points on the patch should have zero displacement along x and y directions.

```
Add BC: patch {
Type: Dir
Value: 0.0
Effective direction: (1, 1, 0)
}
```

This is achieved through `Effective direction` command. Currently, the software only supports specify Dirichlet BC along Cartesian directions. For example, `(1,0,0)` or `(1,0)` sets Dirichlet BC along x-axis in 3D or 2D.



## 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.
3 changes: 3 additions & 0 deletions tests/cases/block_compression/load.dat
Git LFS file not shown
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/block_compression/mesh/P1/mesh-complete.mesh.vtu
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/block_compression/mesh/P1/mesh-surfaces/X0.vtp
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/block_compression/mesh/P1/mesh-surfaces/X1.vtp
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/block_compression/mesh/P1/mesh-surfaces/Y0.vtp
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/block_compression/mesh/P1/mesh-surfaces/Y1.vtp
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/block_compression/mesh/P1/mesh-surfaces/Z0.vtp
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/block_compression/mesh/P1/mesh-surfaces/Z1.vtp
Git LFS file not shown
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/block_compression/result_001.vtu
Git LFS file not shown
122 changes: 122 additions & 0 deletions tests/cases/block_compression/svFSI.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<?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> 1 </Number_of_time_steps>
<Time_step_size> .0001 </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> 1 </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> 100 </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="msh" >

<Mesh_file_path> mesh/P1/mesh-complete.mesh.vtu </Mesh_file_path>

<Add_face name="X0">
<Face_file_path> mesh/P1/mesh-surfaces/X0.vtp </Face_file_path>
</Add_face>

<Add_face name="X1">
<Face_file_path> mesh/P1/mesh-surfaces/X1.vtp </Face_file_path>
</Add_face>

<Add_face name="Y0">
<Face_file_path> mesh/P1/mesh-surfaces/Y0.vtp </Face_file_path>
</Add_face>

<Add_face name="Y1">
<Face_file_path> mesh/P1/mesh-surfaces/Y1.vtp </Face_file_path>
</Add_face>

<Add_face name="Z0">
<Face_file_path> mesh/P1/mesh-surfaces/Z0.vtp </Face_file_path>
</Add_face>

<Add_face name="Z1">
<Face_file_path> mesh/P1/mesh-surfaces/Z1.vtp </Face_file_path>
</Add_face>

<Mesh_scale_factor> 0.001 </Mesh_scale_factor>

</Add_mesh>


<Add_equation type="struct" >

<Coupled> true </Coupled>
<Min_iterations> 1</Min_iterations>
<Max_iterations> 10 </Max_iterations>
<Tolerance> 1e-10 </Tolerance>

<Constitutive_model type="nHK"> </Constitutive_model>
<Density> 1000.0 </Density>
<Elasticity_modulus> 240.56596E6 </Elasticity_modulus>
<Poisson_ratio> 0.5 </Poisson_ratio>

<Dilational_penalty_model> ST91 </Dilational_penalty_model>
<Penalty_parameter> 4.0E9 </Penalty_parameter>

<Output type="Spatial" >
<Displacement> true </Displacement>
<Velocity> true </Velocity>
<Jacobian> true </Jacobian>
<Stress> true </Stress>
<Strain> true </Strain>
<Cauchy_stress> true </Cauchy_stress>
<Def_grad> true </Def_grad>
<VonMises_stress> true </VonMises_stress>
</Output>

<LS type="BICG" >
<Preconditioner> FSILS </Preconditioner>
<Tolerance> 1e-11 </Tolerance>
<Max_iterations> 600 </Max_iterations>
</LS>

<Add_BC name="X0" >
<Type> Dir </Type>
<Value> 0.0 </Value>
<Effective_direction> (1, 0, 0) </Effective_direction>
</Add_BC>

<Add_BC name="Y0" >
<Type> Dir </Type>
<Value> 0.0 </Value>
<Effective_direction> (0, 1, 0) </Effective_direction>
</Add_BC>

<Add_BC name="Z0" >
<Type> Dir </Type>
<Value> 0.0 </Value>
<Effective_direction> (0, 0, 1) </Effective_direction>
</Add_BC>

<Add_BC name="Z1" >
<Type> Neu </Type>
<Time_dependence> Unsteady </Time_dependence>
<Temporal_values_file_path> load.dat </Temporal_values_file_path>
<Ramp_function> true </Ramp_function>
<Follower_pressure_load> true </Follower_pressure_load>
</Add_BC>

</Add_equation>

</svFSIFile>


Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c14486e

Please sign in to comment.