Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add equilibrated constrained mixture model #32

Open
mrp089 opened this issue Jun 14, 2021 · 5 comments
Open

Add equilibrated constrained mixture model #32

mrp089 opened this issue Jun 14, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@mrp089
Copy link
Member

mrp089 commented Jun 14, 2021

The model is defined here:

https://doi.org/10.1002/zamm.201700302
https://doi.org/10.1371/journal.pcbi.1008273

I will adapt Marcos's FEBio implementation to svFSI.

@mrp089 mrp089 added the enhancement New feature or request label Jun 14, 2021
@mrp089 mrp089 self-assigned this Jun 14, 2021
@mrp089
Copy link
Member Author

mrp089 commented Jun 15, 2021

@vvedula22 Is there a way to pass the current time and spatial position in MATMODELS.f to my material evaluation?

@vvedula22
Copy link
Contributor

Try using this code as an example for passing the location of the integration point to MATMODELS.f. You can backtrace to see how the integration point is evaluated and passed to the stress subroutine. The global variable time is accessible through the module COMMOD which is already included in these subroutines.

@mrp089
Copy link
Member Author

mrp089 commented Jun 15, 2021

Thanks, @vvedula22!

@mrp089
Copy link
Member Author

mrp089 commented Jul 13, 2021

I need two different fiber orientations that are defined on the mesh.

I found an example to define a constant fiber direction, e.g. in https://github.com/SimVascular/svFSI-Tests/blob/master/05-struct/02-LV-Guccione-passive/Q1_svFSI.inp:

Add mesh: msh {
   [...]
   Fiber direction: (1.0, 0.0, 0.0)
   Fiber direction: (0.0, 1.0, 0.0)
}

I also found code to read mesh fibers (defined on each node/element?):

! Read fiber orientation
flag = .FALSE.
DO iM=1, nMsh
lPM => list%get(msh(iM)%name,"Add mesh",iM)
j = lPM%srch("Fiber direction file path")
IF (j .EQ. 0) j = lPM%srch("Fiber direction")
IF (j .NE. 0) THEN
flag = .TRUE.
EXIT
END IF
END DO
IF (flag) THEN
DO iM=1, nMsh
lPM => list%get(msh(iM)%name,"Add mesh",iM)
msh(iM)%nFn = lPM%srch("Fiber direction file path")
IF (msh(iM)%nFn .NE. 0) THEN
IF (rmsh%isReqd) err = "Fiber directions read from "//
2 "file is not allowed with remeshing"
ALLOCATE(msh(iM)%fN(msh(iM)%nFn*nsd,msh(iM)%gnEl))
msh(iM)%fN = 0._RKIND
DO i=1, msh(iM)%nFn
lPtr => lPM%get(cTmp,
2 "Fiber direction file path", i)
IF (ASSOCIATED(lPtr))
2 CALL READFIBNFF(msh(iM), cTmp, "FIB_DIR", i)
END DO
ELSE
msh(iM)%nFn = lPM%srch("Fiber direction")
IF (msh(iM)%nFn .NE. 0) THEN
ALLOCATE(msh(iM)%fN(msh(iM)%nFn*nsd,msh(iM)%gnEl))
msh(iM)%fN = 0._RKIND
DO i=1, msh(iM)%nFn
lPtr => lPM%get(fibN, "Fiber direction", i)
rtmp = SQRT(NORM(fibN))
IF (.NOT.ISZERO(rtmp)) fibN(:) = fibN(:)/rtmp
DO e=1, msh(iM)%gnEl
msh(iM)%fN((i-1)*nsd+1:i*nsd,e) = fibN(1:nsd)
END DO
END DO
END IF
END IF
END DO
ELSE
msh(:)%nFn = 0
END IF

@vvedula22 Do you have a sample input file that uses spatially varying fiber families?

@vvedula22
Copy link
Contributor

I need two different fiber orientations that are defined on the mesh.

I found an example to define a constant fiber direction, e.g. in https://github.com/SimVascular/svFSI-Tests/blob/master/05-struct/02-LV-Guccione-passive/Q1_svFSI.inp:

Add mesh: msh {
   [...]
   Fiber direction: (1.0, 0.0, 0.0)
   Fiber direction: (0.0, 1.0, 0.0)
}

I also found code to read mesh fibers (defined on each node/element?):

! Read fiber orientation
flag = .FALSE.
DO iM=1, nMsh
lPM => list%get(msh(iM)%name,"Add mesh",iM)
j = lPM%srch("Fiber direction file path")
IF (j .EQ. 0) j = lPM%srch("Fiber direction")
IF (j .NE. 0) THEN
flag = .TRUE.
EXIT
END IF
END DO
IF (flag) THEN
DO iM=1, nMsh
lPM => list%get(msh(iM)%name,"Add mesh",iM)
msh(iM)%nFn = lPM%srch("Fiber direction file path")
IF (msh(iM)%nFn .NE. 0) THEN
IF (rmsh%isReqd) err = "Fiber directions read from "//
2 "file is not allowed with remeshing"
ALLOCATE(msh(iM)%fN(msh(iM)%nFn*nsd,msh(iM)%gnEl))
msh(iM)%fN = 0._RKIND
DO i=1, msh(iM)%nFn
lPtr => lPM%get(cTmp,
2 "Fiber direction file path", i)
IF (ASSOCIATED(lPtr))
2 CALL READFIBNFF(msh(iM), cTmp, "FIB_DIR", i)
END DO
ELSE
msh(iM)%nFn = lPM%srch("Fiber direction")
IF (msh(iM)%nFn .NE. 0) THEN
ALLOCATE(msh(iM)%fN(msh(iM)%nFn*nsd,msh(iM)%gnEl))
msh(iM)%fN = 0._RKIND
DO i=1, msh(iM)%nFn
lPtr => lPM%get(fibN, "Fiber direction", i)
rtmp = SQRT(NORM(fibN))
IF (.NOT.ISZERO(rtmp)) fibN(:) = fibN(:)/rtmp
DO e=1, msh(iM)%gnEl
msh(iM)%fN((i-1)*nsd+1:i*nsd,e) = fibN(1:nsd)
END DO
END DO
END IF
END IF
END DO
ELSE
msh(:)%nFn = 0
END IF

@vvedula22 Do you have a sample input file that uses spatially varying fiber families?

@mrp089 You can load fiber directions stored at element level from a vtu file as described here
svFSI_master.inp

   #  # Fiber directions may be loaded for some material models. Fiber
   #  # direction must be stored at the element level using the data
   #  # array name, "FIB_DIR", in the vtu format.
   #    Fiber direction file path: ./mesh/fibers_longitudinal.vtu
   #    Fiber direction file path: ./mesh/fibers_sheet.vtu

Note that the fiber directions are loaded within Add msh block in the input file. Here is an example:

https://github.com/SimVascular/svFSI-Tests/blob/master/06-ustruct/03-LV-Guccione-active/svFSI.inp

Add mesh: msh {
   [...]
   Fiber direction file path: mesh/P1/fibersLong.vtu
   Fiber direction file path: mesh/P1/fibersSheet.vtu
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants