Page 1 of 2

Running svFSI from command line

Posted: Tue Apr 16, 2019 7:35 am
by tshidhor
Hello,

I have built svFSI from source on a cluster. What are the steps to run the application from command line if I have the simulation files generated using the SimVascular GUI? Thank you.

Re: Running svFSI from command line

Posted: Tue Apr 16, 2019 9:57 am
by davep
Hi Tanmay,

Under your projects svFSI directory there is a directory with the name you used to create the svFSI job. For example on Linux:

ls -1 WCB_Demo_Project/svFSI/demo_fsi
demo_fsi.txt
short_cyl_lumen-mesh-complete/
short_cyl_wall-mesh-complete/

Change directories to WCB_Demo_Project/svFSI/demo_fsi and run a 4-processor job using

mpiexec -n 4 svFSI_BUILD_DIR/svFSI-build/mysvfsi demo_fsi.txt

where svFSI_BUILD_DIR is the location of the directory where you built svFSI.

svFSI_BUILD_DIR/svFSI-build/mysvfsi is a shell script that sets the location of the libraries needed by svFSI. The svFSI executable is located in svFSI_BUILD_DIR/svFSI-build/bin.

svFSI needs the .txt and mesh-complete files located in the svFSI directory to run so you must copy these files to the cluster to execute a job there.

Cheers,
Dave

Re: Running svFSI from command line

Posted: Thu Apr 18, 2019 2:36 pm
by tshidhor
Thanks David! That worked. A follow up question on that, what is the format for the temporal values file to prescribe a transient inlet flow profile? I wasn't able to find an example for that in the documentation and the ".flow" files that I had used previously for svSolver don't seem to work.

Re: Running svFSI from command line

Posted: Tue Apr 23, 2019 4:14 pm
by vvedula22
To apply transient (or unsteady) BCs using svFSI, you have to provide a "Temporal values file path" keyword in "Add BC" command. The format for the file is as follows:

On line 1, specify total number of time points and the number of Fourier modes used to approximate the unsteady profile. In the following lines, provide the time point and the prescribed value at that corresponding time. Note that the solver assumes the profile to be periodic.

Sample format:

Code: Select all

num_times    num_Fourier_modes
t_1    value_1
t_2    value_2
.
.
.
t_last  value_last
and the corresponding entry in the input file could be:

Code: Select all

   Add BC: inflow {
      Type: Dirichlet
      Time dependence: Unsteady
      Temporal values file path: inflow.flow
   }

Re: Running svFSI from command line

Posted: Tue May 19, 2020 9:20 am
by tshidhor
Hello,

I updated my svFSI compilation and when I tried to follow through the above procedure, it resulted in the following error:

"
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR occurred, see below for more explanation
ERROR: Failed to identify format of the mesh
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
"

I am exporting the meshes using the "Export Mesh-Complete" option and I recall that this procedure had worked in the past without any problems.
Any help in resolving the issue would be great.

Thanks

Re: Running svFSI from command line

Posted: Tue May 19, 2020 12:50 pm
by davep
Hi Tanmay,

The source code in svFSI repository currently uses an input solver file format that is incompatible with the format of the solver file produced by the SimVascular SV FSI tool. The SimTK svFSI installers are compatible with the SimVascular SV FSI tool format but use an older version of svFSI.

Cheers,
Dave

Re: Running svFSI from command line

Posted: Tue May 19, 2020 12:56 pm
by tshidhor
Thanks Dave! Is there a tutorial or example case which contains a template for new input solver file, or would it be advisable to switch to the older svFSI version?

Re: Running svFSI from command line

Posted: Tue May 19, 2020 1:03 pm
by davep
That depends on your application. The new svFSI solver has additional material models and supports non-Newtonian fluids. There are no examples or documentation about the new format or material models so you will need to contact Vijay for the new file format.

You may want to just use the old version.

Cheers,
Dave

Re: Running svFSI from command line

Posted: Tue May 19, 2020 1:11 pm
by tshidhor
I will get in touch with Vijay about getting the new input file format. Thanks a lot!

Re: Running svFSI from command line

Posted: Tue May 19, 2020 2:04 pm
by vvedula22
Thanks Dave.

Hi Tanmay: I just responded to you over email and am also posting here for others.

I am attaching a template for fluids equation with Newtonian viscosity. It is a simple pipe flow with parabolic unsteady flow at the inlet and RCR boundary condition at the outlet. The file extensions are made as .txt so I can upload them.

Thanks,
Vijay