SimVascular / svFSIplus

This repository contains a line-by-line conversion of the Fortran svFSI solver to C++.
Other
7 stars 20 forks source link

Solid viscosity bug #35

Closed aabrown100-git closed 1 year ago

aabrown100-git commented 1 year ago

There appears to be a bug in the implementation of solid viscosity in both STRUCT and USTRUCT. As the value of viscosity increases, the convergence of the Newton iteration deteriorates or fails altogether. @vvedula22 @LeiShi3374 and I have been working on fixing this issue. The latest implementation can be found at this commit on Vijay's fork: https://github.com/vvedula22/svFSI/commit/a902e8f7611c82dc17a674c91e35a55ea0d751b3.

We are currently working in the Fortran version to fix this bug (see this issue https://github.com/SimVascular/svFSI/issues/95). When it is fixed, we can translate and migrate it into svFSIplus.

ktbolt commented 1 year ago

I've modified struct_2d and struct_3d to reflect the svFSI Fortran changes, added mat_dev, mat_symm and mat_dev functions.

Note that struct_2d and struct_3d contain modifications for other functionality (e.g. electromechanics). I did not include these changes because it would create a large cascade of code changes that we are not yet ready to add.

ktbolt commented 1 year ago

I've modified ustruct_2d_c, ustruct_2d_m, ustruct_3d_c and ustruct_3d_m to reflect the svFSI Fortran changes.

@aabrown100-git I need a simulation job to test please.

aabrown100-git commented 1 year ago

01-block-compression.zip Here is a test case that I modified from the struct block compression test by adding "Viscosity" in the input file. I tested this with the current Fortran svFSI, as well as the Fortran svFSI from early April before Vijay's viscosity changes. As you can see in the histor.dat files, there is a big improvement in convergence.

ktbolt commented 1 year ago

Thanks @aabrown100-git, testing now.

ktbolt commented 1 year ago

I've added a solid_viscosity parameter and fixed an indexing problem in struct_3d. Results match Fortran.

ktbolt commented 1 year ago

Merged into main.