SimVascular / svFSIplus

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

Add spatially distributed material parameters #77

Open mrp089 opened 10 months ago

mrp089 commented 10 months ago

Aim Add the ability for users to define spatially distributed material parameters. They are typically defined on every mesh point and interpolated to the Gauss points using the shape functions.

Scope This is required for all growth and remodeling (G&R) material models (#2, #33, #49).

Previous implementation @schwarz-e implemented this feature for svFSI (grep my fork for varWall) and opened an issue and pull request that we never merged. In this implementation, we defined an n-dimensional (input parameter Number of variable wall properties) vector (point array name varWallProps) that's read from a .vtu file (input parameter Variable wall properties file path). We query this n-dimensional array within the material model to extract the material parameters we need.

Suggested improvements @vvedula22 suggested two improvements to this code:

Related implementation We already have spatially distributed parameters for fiber directions and CMM variable wall properties. However, those are currently handled as special cases.

New implementation We should use the current code (handling file IO, parallelization, interpolation) and build a unified framework to read spatially distributed material parameters. We can also use this framework for fibers and CMM properties since they fall into the same category. My suggestion:

I think this way should be robust and easy to use in the input file. Furthermore, the material evaluation would be independent of how parameters are defined. This makes it easy to define new material models which get spatially distributed parameters "for free." @ktbolt, please let me know if you think this is feasible!

ktbolt commented 9 months ago

@mrp089 I think this is all feasible, just need to determine where the functions and data will reside, probably create a class for all of this.

It would be good to stop storing data in VTK files but since everyone knows how to do that maybe now is not the time.

mrp089 commented 8 months ago

@ktbolt, did you get a chance yet to look at this?

ktbolt commented 8 months ago

@mrp089 I've not looked at this yet.

mrp089 commented 6 months ago

@ktbolt, reading in nodal values is also needed to migrate @zinanhu0810's code from - to +. In her case, it's reading in active myocardial stress.

ktbolt commented 6 months ago

@mrp089 The VtkData class is used to read nodal values from VTK files (see read_vtu_pdata()) as an example.