Skip to content

Commit ef69207

Browse files
authored
Extended FSI capabilities by including ustruct as solid solver (SimVascular#458)
* added test case folder fsi_ustruct * added test_fsi_ustruct.py for integration tests
1 parent 75edf0a commit ef69207

File tree

26 files changed

+439
-6
lines changed

26 files changed

+439
-6
lines changed

Code/Source/solver/fsi.cpp

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "lhsa.h"
1111
#include "nn.h"
1212
#include "sv_struct.h"
13+
#include "ustruct.h"
1314
#include "utils.h"
1415
#include "ris.h"
1516

@@ -246,9 +247,9 @@ void construct_fsi(ComMod& com_mod, CepMod& cep_mod, const mshType& lM, const Ar
246247
break;
247248

248249
case Equation_ustruct:
249-
throw std::runtime_error("[construct_fsi] USTRUCT3D_M not implemented");
250-
//CALL USTRUCT3D_M(vmsStab, fs(1).eNoN, fs(2).eNoN, nFn, w, Jac, fs(1).N(:,g), fs(2).N(:,g), Nwx, al, yl,
251-
// dl, bfl, fN, ya_l, lR, lK, lKd)
250+
auto N0 = fs_1[0].N.col(g);
251+
auto N1 = fs_1[1].N.col(g);
252+
ustruct::ustruct_3d_m(com_mod, cep_mod, vmsStab, fs_1[0].eNoN, fs_1[1].eNoN, nFn, w, Jac, N0, N1, Nwx, al, yl, dl, bfl, fN, ya_l, lR, lK, lKd);
252253
break;
253254
}
254255

@@ -314,8 +315,9 @@ void construct_fsi(ComMod& com_mod, CepMod& cep_mod, const mshType& lM, const Ar
314315
} break;
315316

316317
case Equation_ustruct:
317-
throw std::runtime_error("[construct_fsi] USTRUCT3D_C not implemented");
318-
//CALL USTRUCT3D_C(vmsStab, fs(1).eNoN, fs(2).eNoN, w, Jac, fs(1).N(:,g), fs(2).N(:,g), Nwx, Nqx, al, yl, dl, bfl, lR, lK, lKd)
318+
auto N0 = fs_2[0].N.col(g);
319+
auto N1 = fs_2[1].N.col(g);
320+
ustruct::ustruct_3d_c(com_mod, cep_mod, vmsStab, fs_2[0].eNoN, fs_2[1].eNoN, w, Jac, N0, N1, Nwx, Nqx, al, yl, dl, bfl, lR, lK, lKd);
319321
break;
320322
}
321323

@@ -337,7 +339,14 @@ void construct_fsi(ComMod& com_mod, CepMod& cep_mod, const mshType& lM, const Ar
337339
}
338340
} // g: loop
339341

340-
eq.linear_algebra->assemble(com_mod, eNoN, ptr, lK, lR);
342+
if (cPhys == Equation_ustruct)
343+
{
344+
ustruct::ustruct_do_assem(com_mod, eNoN, ptr, lKd, lK, lR);
345+
}
346+
else
347+
{
348+
eq.linear_algebra->assemble(com_mod, eNoN, ptr, lK, lR);
349+
}
341350

342351
if (com_mod.risFlag) {
343352
if (!std::all_of(com_mod.ris.clsFlg.begin(), com_mod.ris.clsFlg.end(), [](bool v) { return v; })) {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
# **Problem Description**
3+
4+
Simulate pressure wave propagation in an arterial model using the Arbitrary Lagrangian-Eulerian method [1]. The problem set-up is as follows.
5+
6+
<p align="center">
7+
<img src="./configuration.png" width="600">
8+
</p>
9+
10+
And the results are
11+
12+
<p align="center">
13+
<img src="./results.gif" width="600">
14+
</p>
15+
16+
17+
## References
18+
19+
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.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:bff21b54094fe528e6f7cd9b57dafc5863b530e112e08f8a62a04431ec14a7a3
3+
size 67969
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:57511367796bab30c07b3b5dbd3b6ec596e433cb1aae2afe763f05ab357655bf
3+
size 13661
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:4c4a25e331d2c3ccbfa2ffcdd52e0ebbd37a8045989bec9abd7b2c0ed775e2b8
3+
size 28724
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:d90d5fb5ce21d0889b27fd0a592aafa6121d19047bebd801710caf5cba6fb48a
3+
size 13685
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:2527472b08ece18c95175c0661ca838f90ac8b97406d0c1c77459e94df620fe7
3+
size 36980
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:abb10cc3c374742b481031050fd6ceb2af30b8a14bd5627d89f930a4df01708a
3+
size 12351
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:9302a80f392f30ae07b98d0048cb7ad85f2fd3fcb0a86dbe50def69ba5a6cafc
3+
size 28900
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:29c18dc6c30b33a98016c3df4038433430307f05bc5fd3d2d39469b4a3d4bb63
3+
size 28813

0 commit comments

Comments
 (0)