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

fsi_tissue: 在已有的fsi程序中引入了用于生成局部纤维的局部坐标系功能。 #128

Open
wants to merge 87 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
aee1288
push test
Nov 18, 2023
a35ab54
delete test file
Nov 18, 2023
56f562e
HDF5_Writer: add a new function to write a Vector_3 type vector
Nov 18, 2023
341940c
VTK_Tools: add a new function to read a Vector_3 type vector
Nov 18, 2023
26c3439
new partition class especially for tissue with fibre direction data
Nov 18, 2023
4663117
new preprocess cpp for tissue
Nov 19, 2023
24c3877
update cmakelist
Nov 19, 2023
647d872
GOH06 model in
Nov 19, 2023
88a6abc
HDF5_Reader: add a new function to read fibre direction
Nov 19, 2023
88c066c
new class for tissue property
Nov 19, 2023
be407b1
update cmake file
Nov 19, 2023
820d80c
tissue property in
Nov 19, 2023
823e57c
global assembly mass residual: tissue property in
Nov 19, 2023
9705e90
PGAssem_FSI changed
Nov 19, 2023
4f2ce12
PLocAssem_2x2Block changed
Nov 19, 2023
406d2e3
Merge branch 'master' into lu-dev2
Nov 20, 2023
be2c6ee
PetscInitialize
Nov 20, 2023
daabdcb
delete tissue property pointer
Nov 20, 2023
5207758
pass tissue property information to nonlinear solver
Nov 20, 2023
5bcc2b2
change of time solver
Nov 20, 2023
2558b16
change of nonlinear solver
Nov 20, 2023
7633698
change of global assembly
Nov 20, 2023
cb40953
change of local assembly
Nov 20, 2023
e7a3ce5
change in basis class IPLocAssem_2x2Block.hpp
Nov 20, 2023
0d75a52
new function to update the fibre orientation vector a1 and a2
Nov 20, 2023
c385ddf
change in GOH06_Incompressible material
Nov 20, 2023
616552a
change in GOH06_ST91 material
Nov 20, 2023
e7eb30b
Hyperelasticity local assembly apply the update fibre direction function
Nov 20, 2023
baa4dfe
Incompressible local assembly apply the update fibre direction function
Nov 20, 2023
cc34400
make it easier to compare with master branch
Nov 20, 2023
2429969
change of cmake file
Nov 20, 2023
68e100b
debug
Nov 20, 2023
2bec035
add fixed fibre orientation vector a01 and a02 for update_fibre_dir
Nov 22, 2023
c1a71dd
change in GOH06_ST91_Mixed model
Nov 22, 2023
44e41fa
modify comment
Nov 22, 2023
401b684
JL indent the code
ju-liu Nov 23, 2023
b41216b
JL indent the code of Part_FEM_FSI_Tissue
ju-liu Nov 23, 2023
514fbd1
JL formated the Tissue_property code.
ju-liu Nov 23, 2023
09c0d53
align
Nov 23, 2023
974f2eb
HDF5_Writer: replace std::vector.size() by VEC_T::get_size
Nov 23, 2023
5e2f799
local assembly: basis vector only need once normalize for each quadra…
Nov 23, 2023
b165983
minor
Nov 23, 2023
fa0fe8e
JL indent code
ju-liu Nov 24, 2023
7e55d83
JL indent code
ju-liu Nov 24, 2023
a523d51
reuse write_doubleVector and read_doubleVector to implement read and …
Nov 25, 2023
bed9b49
VTK_T::read_Vector3_PointData to VTK_T::read_Vector_3_PointData
Nov 25, 2023
a23c272
HDF5_Reader::read_Vector_3_Vector to HDF5_Reader::read_Vector3_Vector
Nov 25, 2023
6ffc522
HDF5_Writer::write_Vector_3_Vector to HDF5_Writer::write_Vector3_Vector
Nov 25, 2023
8f065ef
correct typo
Nov 25, 2023
5c9f0ad
update_fibre_dir: change r-l-c to r-c-l
Nov 25, 2023
90736a3
preprocess_fsi: r-l-c to r-c-l
Nov 25, 2023
1fc6c38
Tissue_property: r-l-c to r-c-l
Nov 25, 2023
e72fd48
Part_FEM_FSI_Tissue: r-l-c to r-c-l
Nov 25, 2023
e354cab
local assembly: r-l-c to r-c-l
Nov 25, 2023
37b89f5
comment on VTK_T::read_Vector_3_PointData
Nov 26, 2023
68e6ff2
comment on Part_FEM_FSI_Tissue
Nov 26, 2023
77ffcb5
prestress: Tissue property in, GOH06 model in
Nov 26, 2023
693c4c2
tissue data pass through time solver and nonlinear solver
Nov 26, 2023
8f91cea
change of prestress global assembly
Nov 26, 2023
11118a4
change of prestress local assembly
Nov 26, 2023
99c81e6
minor
Nov 26, 2023
f5c55b8
Detect length in HDF5_Reader::read_Vector_3_Vector
Goldeninscriptions Nov 29, 2023
2ed3ec9
IPLocAssem_2x2Block::get_Wall_CauchyStress: r-l-c to r-c-l
Nov 29, 2023
cdfb9d5
PGAssem_Wall_Prestress: r-l-c to r-c-l
Nov 30, 2023
5998825
GOH14 in
Mar 20, 2024
4fa8234
visualization of von-Mises stress
Mar 20, 2024
3c4ad1d
revis from lu
Syj-0525 Mar 20, 2024
061b612
Copy from yue and moidify for smoothing grad_disp
Syj-0525 Apr 9, 2024
86ca353
correct a bug
Syj-0525 Apr 15, 2024
a9f6631
Revert "correct a bug"
Syj-0525 Apr 15, 2024
7e43736
Revert "Copy from yue and moidify for smoothing grad_disp"
Syj-0525 Apr 15, 2024
ff9c60c
add driver for stress recovery
SeaVegetable Apr 15, 2024
1883e69
add visualization file for fsi smooth
SeaVegetable Apr 15, 2024
07d0838
minor
SeaVegetable Apr 15, 2024
bb55033
add header and source files
SeaVegetable Apr 15, 2024
bb672a3
add cmakelists
SeaVegetable Apr 15, 2024
6dedf8e
add functions in base class
SeaVegetable Apr 15, 2024
894d1fd
remove tissue property from the analysis part
SeaVegetable Apr 16, 2024
e1d197c
minor
SeaVegetable Apr 16, 2024
bd51173
minor
SeaVegetable Apr 16, 2024
4ece59b
vis for fiber orientation
Syj-0525 Apr 16, 2024
3308b9b
conclude merge
Syj-0525 Apr 16, 2024
4fd47fc
minor
Syj-0525 Apr 16, 2024
293e706
minor
SeaVegetable Apr 16, 2024
d974c2e
coorect a bug
Syj-0525 Apr 16, 2024
14f06d4
correct the bug
Syj-0525 Apr 16, 2024
ccabfc8
format
Syj-0525 Apr 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/fsi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ SET( perigee_preprocess_lib_src
${perigee_source}/Mesh/Global_Part_Reload.cpp
${perigee_source}/Mesh/Part_FEM.cpp
${perigee_source}/Mesh/Part_FEM_FSI.cpp
${perigee_source}/Mesh/Part_FEM_FSI_Tissue.cpp
${perigee_source}/Element/FE_Tools.cpp
${perigee_source}/Element/FEAElement_Triangle3_3D_der0.cpp
${perigee_source}/Element/FEAElement_Triangle6_3D_der0.cpp
Expand Down Expand Up @@ -103,7 +104,10 @@ SET( perigee_analysis_lib_src
${perigee_source}/Element/FEAElement_Hex8.cpp
${perigee_source}/Model/MaterialModel_NeoHookean_M94_Mixed.cpp
${perigee_source}/Model/MaterialModel_NeoHookean_Incompressible_Mixed.cpp
${perigee_source}/Model/MaterialModel_GOH06_Incompressible_Mixed.cpp
${perigee_source}/Model/MaterialModel_GOH06_ST91_Mixed.cpp
${perigee_source}/Model/Tissue_prestress.cpp
${perigee_source}/Model/Tissue_property.cpp
${perigee_source}/Model/GenBC_RCR.cpp
${perigee_source}/Model/GenBC_Resistance.cpp
${perigee_source}/Model/GenBC_Inductance.cpp
Expand Down
45 changes: 39 additions & 6 deletions examples/fsi/fsi_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include "GenBC_Pressure.hpp"
#include "MaterialModel_NeoHookean_M94_Mixed.hpp"
#include "MaterialModel_NeoHookean_Incompressible_Mixed.hpp"
#include "MaterialModel_GOH06_ST91_Mixed.hpp"
#include "MaterialModel_GOH06_Incompressible_Mixed.hpp"
#include "PLocAssem_2x2Block_ALE_VMS_NS_GenAlpha.hpp"
#include "PLocAssem_2x2Block_VMS_Incompressible.hpp"
#include "PLocAssem_2x2Block_VMS_Hyperelasticity.hpp"
Expand All @@ -35,7 +37,6 @@
#include "PGAssem_FSI.hpp"
#include "PGAssem_Mesh.hpp"
#include "PTime_FSI_Solver.hpp"

#include "PDNTimeStep.hpp"
#include "PETSc_Tools.hpp"
#include "APart_Node_FSI.hpp"
Expand All @@ -59,6 +60,14 @@ int main(int argc, char *argv[])
double solid_density = 1.0;
double solid_E = 2.0e6;
double solid_nu = 0.5;
double solid_mu = 6.67e5;
double solid_f1the = 40.02;
double solid_f1phi = 0.0;
double solid_f2the = -40.02;
double solid_f2phi = 0.0;
double solid_fk1 = 9.966e5;
double solid_fk2 = 524.6;
double solid_fkd = 0.333;

// mesh motion elasticity solver parameters
double mesh_E = 1.0;
Expand Down Expand Up @@ -159,6 +168,14 @@ int main(int argc, char *argv[])
SYS_T::GetOptionReal( "-sl_density", solid_density);
SYS_T::GetOptionReal( "-sl_E", solid_E);
SYS_T::GetOptionReal( "-sl_nu", solid_nu);
SYS_T::GetOptionReal( "-sl_mu", solid_mu);
SYS_T::GetOptionReal( "-sl_f1the", solid_f1the);
SYS_T::GetOptionReal( "-sl_f1phi", solid_f1phi);
SYS_T::GetOptionReal( "-sl_f2the", solid_f2the);
SYS_T::GetOptionReal( "-sl_f2phi", solid_f2phi);
SYS_T::GetOptionReal( "-sl_fk1", solid_fk1);
SYS_T::GetOptionReal( "-sl_fk2", solid_fk2);
SYS_T::GetOptionReal( "-sl_fkd", solid_fkd);
SYS_T::GetOptionReal( "-mesh_E", mesh_E);
SYS_T::GetOptionReal( "-mesh_nu", mesh_nu);
SYS_T::GetOptionInt( "-inflow_type", inflow_type);
Expand Down Expand Up @@ -198,6 +215,14 @@ int main(int argc, char *argv[])
SYS_T::cmdPrint("-sl_density:", solid_density);
SYS_T::cmdPrint("-sl_E:", solid_E);
SYS_T::cmdPrint("-sl_nu:", solid_nu);
SYS_T::cmdPrint("-sl_mu:", solid_mu);
SYS_T::cmdPrint("-sl_f1the:", solid_f1the);
SYS_T::cmdPrint("-sl_f1phi:", solid_f1phi);
SYS_T::cmdPrint("-sl_f2the:", solid_f2the);
SYS_T::cmdPrint("-sl_f2phi:", solid_f2phi);
SYS_T::cmdPrint("-sl_fk1:", solid_fk1);
SYS_T::cmdPrint("-sl_fk2:", solid_fk2);
SYS_T::cmdPrint("-sl_fkd:", solid_fkd);
SYS_T::cmdPrint("-mesh_E:", mesh_E);
SYS_T::cmdPrint("-mesh_nu:", mesh_nu);

Expand Down Expand Up @@ -331,6 +356,8 @@ int main(int argc, char *argv[])

Tissue_prestress * ps_data = new Tissue_prestress(locElem, nqp_vol, rank, is_load_ps, "./ps_data/prestress");

Tissue_property * tp_data = new Tissue_property(part_v_file, rank);

// Group APart_Node and ALocal_NBC into a vector
std::vector<APart_Node *> pNode_list { pNode_v, pNode_p };

Expand Down Expand Up @@ -451,14 +478,20 @@ int main(int argc, char *argv[])

if( solid_nu == 0.5 )
{
matmodel = new MaterialModel_NeoHookean_Incompressible_Mixed( solid_density, solid_E );
matmodel = new MaterialModel_GOH06_Incompressible_Mixed( solid_density, solid_mu,
solid_f1the, solid_f1phi, solid_f2the, solid_f2phi, solid_fk1, solid_fk2, solid_fkd );

//matmodel = new MaterialModel_NeoHookean_Incompressible_Mixed( solid_density, solid_E );

locAssem_solid_ptr = new PLocAssem_2x2Block_VMS_Incompressible(
matmodel, tm_galpha_ptr, elementv -> get_nLocBas(), elements->get_nLocBas() );
}
else
{
matmodel = new MaterialModel_NeoHookean_M94_Mixed( solid_density, solid_E, solid_nu );
matmodel = new MaterialModel_GOH06_ST91_Mixed( solid_density, solid_E, solid_nu,
solid_f1the, solid_f1phi, solid_f2the, solid_f2phi, solid_fk1, solid_fk2, solid_fkd );

//matmodel = new MaterialModel_NeoHookean_M94_Mixed( solid_density, solid_E, solid_nu );

locAssem_solid_ptr = new PLocAssem_2x2Block_VMS_Hyperelasticity(
matmodel, tm_galpha_ptr, elementv -> get_nLocBas(), elements->get_nLocBas() );
Expand Down Expand Up @@ -593,7 +626,7 @@ int main(int argc, char *argv[])

gloAssem_ptr->Assem_mass_residual( disp, velo, pres, locElem, locAssem_fluid_ptr,
locAssem_solid_ptr, elementv, elements, quadv, quads, locIEN_v, locIEN_p,
fNode, locnbc_v, locnbc_p, locebc_v, ps_data );
fNode, locnbc_v, locnbc_p, locebc_v, ps_data, tp_data );

Vec proj_vp, proj_v, proj_p;
VecDuplicate( gloAssem_ptr->G, &proj_vp );
Expand Down Expand Up @@ -746,7 +779,7 @@ int main(int argc, char *argv[])
tm_galpha_ptr, timeinfo, inflow_rate_ptr, locElem, locIEN_v, locIEN_p,
pNode_v, pNode_p, fNode, locnbc_v, locnbc_p, locinfnbc, mesh_locnbc,
locebc_v, locebc_p, mesh_locebc,
gbc, pmat, mmat, elementv, elements, quadv, quads, ps_data,
gbc, pmat, mmat, elementv, elements, quadv, quads, ps_data, tp_data,
locAssem_fluid_ptr, locAssem_solid_ptr, locAssem_mesh_ptr,
gloAssem_ptr, gloAssem_mesh_ptr, lsolver, mesh_lsolver, nsolver);

Expand All @@ -771,7 +804,7 @@ int main(int argc, char *argv[])
delete GMIptr; delete PartBasic; delete locElem; delete fNode; delete pNode_v; delete pNode_p;
delete locinfnbc; delete locnbc_v; delete locnbc_p; delete mesh_locnbc;
delete locebc_v; delete locebc_p; delete mesh_locebc;
delete locIEN_v; delete locIEN_p; delete ps_data;
delete locIEN_v; delete locIEN_p; delete ps_data; delete tp_data;
PetscFinalize();
return EXIT_SUCCESS;
}
Expand Down
9 changes: 6 additions & 3 deletions examples/fsi/include/PGAssem_FSI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ class PGAssem_FSI : public IPGAssem
const ALocal_NBC * const &nbc_v,
const ALocal_NBC * const &nbc_p,
const ALocal_EBC * const &ebc_part,
const Tissue_prestress * const &ps_ptr );
const Tissue_prestress * const &ps_ptr,
const Tissue_property * const &tp_ptr );

virtual void Assem_Residual(
const double &curr_time, const double &dt,
Expand All @@ -92,7 +93,8 @@ class PGAssem_FSI : public IPGAssem
const ALocal_NBC * const &nbc_p,
const ALocal_EBC * const &ebc_part,
const IGenBC * const &gbc,
const Tissue_prestress * const &ps_ptr );
const Tissue_prestress * const &ps_ptr,
const Tissue_property * const &tp_ptr );

virtual void Assem_Tangent_Residual(
const double &curr_time, const double &dt,
Expand All @@ -119,7 +121,8 @@ class PGAssem_FSI : public IPGAssem
const ALocal_NBC * const &nbc_p,
const ALocal_EBC * const &ebc_part,
const IGenBC * const &gbc,
const Tissue_prestress * const &ps_ptr );
const Tissue_prestress * const &ps_ptr,
const Tissue_property * const &tp_ptr );

// Assembly routine for the surface integrals for flow rates
// and averaged pressure
Expand Down
9 changes: 6 additions & 3 deletions examples/fsi/include/PGAssem_Wall_Prestress.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ class PGAssem_Wall_Prestress : public IPGAssem
const ALocal_NBC * const &nbc_p,
const ALocal_EBC * const &ebc_v,
const ALocal_EBC * const &ebc_p,
const Tissue_prestress * const &ps_ptr );
const Tissue_prestress * const &ps_ptr,
const Tissue_property * const &tp_ptr );

virtual void Assem_Tangent_Residual(
const double &curr_time,
Expand All @@ -81,7 +82,8 @@ class PGAssem_Wall_Prestress : public IPGAssem
const ALocal_NBC * const &nbc_p,
const ALocal_EBC * const &ebc_v,
const ALocal_EBC * const &ebc_p,
const Tissue_prestress * const &ps_ptr );
const Tissue_prestress * const &ps_ptr,
const Tissue_property * const &tp_ptr );

virtual void Update_Wall_Prestress(
const PDNSolution * const &disp,
Expand All @@ -93,7 +95,8 @@ class PGAssem_Wall_Prestress : public IPGAssem
const ALocal_IEN * const &lien_v,
const ALocal_IEN * const &lien_p,
const FEANode * const &fnode_ptr,
Tissue_prestress * const &ps_ptr ) const;
Tissue_prestress * const &ps_ptr,
const Tissue_property * const &tp_ptr ) const;

private:
const int nLocBas, snLocBas, num_ebc, nlgn_v, nlgn_p;
Expand Down
22 changes: 17 additions & 5 deletions examples/fsi/include/PLocAssem_2x2Block_VMS_Hyperelasticity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ class PLocAssem_2x2Block_VMS_Hyperelasticity : public IPLocAssem_2x2Block
const double * const &eleCtrlPts_y,
const double * const &eleCtrlPts_z,
const double * const &qua_prestress,
const IQuadPts * const &quad );
const IQuadPts * const &quad,
const std::vector<Vector_3> &eleBasis_r,
const std::vector<Vector_3> &eleBasis_c,
const std::vector<Vector_3> &eleBasis_l );

virtual void Assem_Tangent_Residual(
const double &time, const double &dt,
Expand All @@ -74,7 +77,10 @@ class PLocAssem_2x2Block_VMS_Hyperelasticity : public IPLocAssem_2x2Block
const double * const &eleCtrlPts_y,
const double * const &eleCtrlPts_z,
const double * const &qua_prestress,
const IQuadPts * const &quad );
const IQuadPts * const &quad,
const std::vector<Vector_3> &eleBasis_r,
const std::vector<Vector_3> &eleBasis_c,
const std::vector<Vector_3> &eleBasis_l );

virtual void Assem_Mass_Residual(
const double * const &disp,
Expand All @@ -85,7 +91,10 @@ class PLocAssem_2x2Block_VMS_Hyperelasticity : public IPLocAssem_2x2Block
const double * const &eleCtrlPts_y,
const double * const &eleCtrlPts_z,
const double * const &qua_prestress,
const IQuadPts * const &quad );
const IQuadPts * const &quad,
const std::vector<Vector_3> &eleBasis_r,
const std::vector<Vector_3> &eleBasis_c,
const std::vector<Vector_3> &eleBasis_l );

virtual void Assem_Residual_EBC(
const int &ebc_id,
Expand Down Expand Up @@ -116,15 +125,18 @@ class PLocAssem_2x2Block_VMS_Hyperelasticity : public IPLocAssem_2x2Block
const double * const &eleCtrlPts_x,
const double * const &eleCtrlPts_y,
const double * const &eleCtrlPts_z,
const IQuadPts * const &quad ) const;
const IQuadPts * const &quad,
const std::vector<Vector_3> &eleBasis_r,
const std::vector<Vector_3> &eleBasis_c,
const std::vector<Vector_3> &eleBasis_l ) const;

private:
const double rho0, alpha_f, alpha_m, gamma;

const int nLocBas, snLocBas, vec_size_0, vec_size_1, sur_size_0;

// useful tensors for the material model
const IMaterialModel * const matmodel;
IMaterialModel * const matmodel;

void print_info() const;

Expand Down
22 changes: 17 additions & 5 deletions examples/fsi/include/PLocAssem_2x2Block_VMS_Incompressible.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ class PLocAssem_2x2Block_VMS_Incompressible : public IPLocAssem_2x2Block
const double * const &eleCtrlPts_y,
const double * const &eleCtrlPts_z,
const double * const &qua_prestress,
const IQuadPts * const &quad );
const IQuadPts * const &quad,
const std::vector<Vector_3> &eleBasis_r,
const std::vector<Vector_3> &eleBasis_c,
const std::vector<Vector_3> &eleBasis_l );

virtual void Assem_Tangent_Residual(
const double &time, const double &dt,
Expand All @@ -74,7 +77,10 @@ class PLocAssem_2x2Block_VMS_Incompressible : public IPLocAssem_2x2Block
const double * const &eleCtrlPts_y,
const double * const &eleCtrlPts_z,
const double * const &qua_prestress,
const IQuadPts * const &quad );
const IQuadPts * const &quad,
const std::vector<Vector_3> &eleBasis_r,
const std::vector<Vector_3> &eleBasis_c,
const std::vector<Vector_3> &eleBasis_l );

virtual void Assem_Mass_Residual(
const double * const &disp,
Expand All @@ -85,7 +91,10 @@ class PLocAssem_2x2Block_VMS_Incompressible : public IPLocAssem_2x2Block
const double * const &eleCtrlPts_y,
const double * const &eleCtrlPts_z,
const double * const &qua_prestress,
const IQuadPts * const &quad );
const IQuadPts * const &quad,
const std::vector<Vector_3> &eleBasis_r,
const std::vector<Vector_3> &eleBasis_c,
const std::vector<Vector_3> &eleBasis_l );

virtual void Assem_Residual_EBC(
const int &ebc_id,
Expand Down Expand Up @@ -116,7 +125,10 @@ class PLocAssem_2x2Block_VMS_Incompressible : public IPLocAssem_2x2Block
const double * const &eleCtrlPts_x,
const double * const &eleCtrlPts_y,
const double * const &eleCtrlPts_z,
const IQuadPts * const &quad ) const;
const IQuadPts * const &quad,
const std::vector<Vector_3> &eleBasis_r,
const std::vector<Vector_3> &eleBasis_c,
const std::vector<Vector_3> &eleBasis_l ) const;

private:
const double rho0, alpha_f, alpha_m, gamma;
Expand All @@ -126,7 +138,7 @@ class PLocAssem_2x2Block_VMS_Incompressible : public IPLocAssem_2x2Block
const int nLocBas, snLocBas, vec_size_0, vec_size_1, sur_size_0;

// useful tensors for the material model
const IMaterialModel * const matmodel;
IMaterialModel * const matmodel;

void print_info() const;

Expand Down
2 changes: 2 additions & 0 deletions examples/fsi/include/PNonlinear_FSI_Solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class PNonlinear_FSI_Solver
const IQuadPts * const &quad_v,
const IQuadPts * const &quad_s,
const Tissue_prestress * const &ps_ptr,
const Tissue_property * const &tp_ptr,
IPLocAssem_2x2Block * const &lassem_fluid_ptr,
IPLocAssem_2x2Block * const &lassem_solid_ptr,
IPLocAssem * const &lassem_mesh_ptr,
Expand Down Expand Up @@ -109,6 +110,7 @@ class PNonlinear_FSI_Solver
const IQuadPts * const &quad_v,
const IQuadPts * const &quad_s,
Tissue_prestress * const &ps_ptr,
const Tissue_property * const &tp_ptr,
IPLocAssem_2x2Block * const &lassem_solid_ptr,
IPGAssem * const &gassem_ptr,
PLinear_Solver_PETSc * const &lsolver_ptr,
Expand Down
4 changes: 3 additions & 1 deletion examples/fsi/include/PTime_FSI_Solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ class PTime_FSI_Solver
FEAElement * const &elements,
const IQuadPts * const &quad_v,
const IQuadPts * const &quad_s,
const Tissue_prestress * const &ps_ptr,
const Tissue_prestress * const &ps_ptr,
const Tissue_property * const &tp_ptr,
IPLocAssem_2x2Block * const &lassem_fluid_ptr,
IPLocAssem_2x2Block * const &lassem_solid_ptr,
IPLocAssem * const &lassem_mesh_ptr,
Expand Down Expand Up @@ -94,6 +95,7 @@ class PTime_FSI_Solver
const IQuadPts * const &quad_v,
const IQuadPts * const &quad_s,
Tissue_prestress * const &ps_ptr,
const Tissue_property * const &tp_ptr,
IPLocAssem_2x2Block * const &lassem_solid_ptr,
IPGAssem * const &gassem_ptr,
PLinear_Solver_PETSc * const &lsolver_ptr,
Expand Down
24 changes: 20 additions & 4 deletions examples/fsi/preprocess_fsi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "Global_Part_METIS.hpp"
#include "Global_Part_Serial.hpp"
#include "Global_Part_Reload.hpp"
#include "Part_FEM_FSI.hpp"
#include "Part_FEM_FSI_Tissue.hpp"
#include "NodalBC.hpp"
#include "NodalBC_3D_FSI.hpp"
#include "NodalBC_3D_inflow.hpp"
Expand Down Expand Up @@ -394,6 +394,22 @@ int main( int argc, char * argv[] )
std::cout<<"Solid domain: "<<v_node_s.size()<<" nodes.\n";
std::cout<<"Fluid-Solid interface: "<<nFunc_interface<<" nodes.\n";

// --------------------------------------------------------------------------
// Read the geometry file for the solid domain, generate the list of direction
// basis vectors of the nodes. The list includes radial, longitudinal, and
// circumferential basis, denoting by r, l, and c, respectively.
const std::vector<int> solid_node_id = VTK_T::read_int_PointData(geo_s_file, "GlobalNodeID");
const std::vector<Vector_3> basis_r = VTK_T::read_Vector_3_PointData(geo_s_file, "radial_basis");
const std::vector<Vector_3> basis_c = VTK_T::read_Vector_3_PointData(geo_s_file, "circumferential_basis");
const std::vector<Vector_3> basis_l = VTK_T::read_Vector_3_PointData(geo_s_file, "longitudinal_basis");

SYS_T::print_fatal_if(v_node_s != solid_node_id, "ERROR: GlobalNodeID for solid geometry file is not equal to the whole FSI domain.");
SYS_T::print_fatal_if(solid_node_id.size() != basis_r.size(), "ERROR: radial_basis is not matched.");
SYS_T::print_fatal_if(solid_node_id.size() != basis_c.size(), "ERROR: circumferential_basis is not matched.");
SYS_T::print_fatal_if(solid_node_id.size() != basis_l.size(), "ERROR: longitudinal_basis is not matched.");
std::cout<<"=== Direction basis vectors generated.\n";
// --------------------------------------------------------------------------

std::vector<IIEN const *> ienlist;
ienlist.push_back(IEN_p); ienlist.push_back(IEN_v);

Expand Down Expand Up @@ -566,9 +582,9 @@ int main( int argc, char * argv[] )

part_p -> write( part_file_p );

IPart * part_v = new Part_FEM_FSI( mesh_v, global_part, mnindex_v, IEN_v,
ctrlPts, phy_tag, v_node_f, v_node_s, proc_rank, cpu_size, elemType,
start_idx_v[proc_rank], { 1, dof_fields[1], true, "velocity"} );
IPart * part_v = new Part_FEM_FSI_Tissue( mesh_v, global_part, mnindex_v, IEN_v,
ctrlPts, phy_tag, v_node_f, v_node_s, basis_r, basis_c, basis_l,
proc_rank, cpu_size, elemType, start_idx_v[proc_rank], { 1, dof_fields[1], true, "velocity"} );

part_v -> print_part_loadbalance_edgecut();

Expand Down
Loading