svMultiPhysics
Loading...
Searching...
No Matches
Classes | Functions
svOneD Namespace Reference

3D-1D coupling subroutines. More...

Classes

struct  OneDModelState
 

Functions

void init_svOneD (ComMod &com_mod, const CmMod &cm_mod)
 Initialize the 1D solver and populate the initial cplBC state. Called once from baf_ini() after the BC data structures are set up.
 
void calc_svOneD (ComMod &com_mod, const CmMod &cm_mod, char BCFlag)
 Advance the 1D solver by one time step and update the coupled BC value.
 

Detailed Description

3D-1D coupling subroutines.

These routines interface the 3D finite-element solver svMultiPhysics with the 1D blood-flow solver svOneDSolver via a dynamically loaded shared library, such as libsvOneDSolver_interface.so or libsvOneDSolver_interface.dylib.

Coupling overview
NEU coupling, where the 1D inlet is driven by the 3D outflow:
  • 3D to 1D: flow rate Q, passed through params[3] and params[4].
  • 1D to 3D: pressure P, returned through cpl_value.
  • 3D boundary condition: Neumann pressure traction.

DIR coupling, where the 1D outlet is driven by the 3D pressure:

Parallelism model
Unlike the 0D solver, which is solved once on the master rank, each 1D model is independent and has its own input file. Multiple 1D models are therefore read, initialized, and solved in parallel.

Initialization in init_svOneD() has two phases:

Time stepping in calc_svOneD() also has two phases:

Parameters passed to run_1d_simulation_step_1d_
  • params[0]: number of time points, currently 2.0.
  • params[1]: t_old, the time at the start of the step.
  • params[2]: t_new, the time at the end of the step.
  • params[3]: BC_val_old, the coupled Q or P value at t_old.
  • params[4]: BC_val_new, the coupled Q or P value at t_new.

Function Documentation

◆ calc_svOneD()

void svOneD::calc_svOneD ( ComMod &  com_mod,
const CmMod &  cm_mod,
char  BCFlag 
)

Advance the 1D solver by one time step and update the coupled BC value.

Parameters
BCFlag'D' - derivative / perturbation step (state is NOT committed). 'L' - last Newton iteration (state IS committed, time advances).

◆ init_svOneD()

void svOneD::init_svOneD ( ComMod &  com_mod,
const CmMod &  cm_mod 
)

Initialize the 1D solver and populate the initial cplBC state. Called once from baf_ini() after the BC data structures are set up.