Question about CORONARY boundary condition in svFSIPlus

Provides a system for patient-specific cardiovascular modeling and simulation.
POST REPLY
User avatar
Ignacio Bartol
Posts: 13
Joined: Fri Aug 16, 2024 9:33 am

Question about CORONARY boundary condition in svFSIPlus

Post by Ignacio Bartol » Mon Aug 26, 2024 2:28 pm

Hi all,

First of all thank you all for all the responses and help that I was receiving either here or in github! Really appreaciated.
I am trying to set up a simulation using a coupled NS-ScalarTransport solver and one of my BC in the outlets is the "CORONARY" BC, which I am implementing using the svZeroDSolver.

When following the documentation for the open loop coronary it says that the dictionary should be constructed like this, from my understanding:

Code: Select all

{
    "simulation_parameters": {
        "coupled_simulation": true,
        "number_of_time_pts": 100,
        "output_all_cycles": true,
        "steady_initial": false
    },
    "boundary_conditions": [
        {
            "bc_name": "Coronary_outlet",
            "bc_type": "CORONARY",
            "bc_values": {
                "Ra": 82923.6,
                "Ram": 134751,
                "Rv": 41461.8,
                "Ca": 8.55939e-07,
                "Cim": 6.92532e-06,
                "P_v": 0,
                "Pim": [...],
                "t": [...]
            }
        }
    ],
    "external_solver_coupling_blocks": [
        {
            "name": "Coronary_outlet_coupling",
            "type": "FLOW",
            "location": "inlet",
            "connected_block": "Coronary_outlet",
            "periodic": false,
            "values": {
                "t": [0.0, 1.0],
                "Q": [1.0, 1.0]
            }
        }
    ],
    "junctions": [],
    "vessels": []
}
Although I was getting multiple errors when executing svFSIPlus, regarding that the variables "Ra", "Ram", etc. did not exist. I took a look at the header file in the docs and the class is defined like this:

Code: Select all

class OpenLoopCoronaryBC : public Block {
 public:
  /**
   * @brief Construct a new OpenLoopCoronaryBC object
   *
   * @param id Global ID of the block
   * @param model The model to which the block belongs
   */
  OpenLoopCoronaryBC(int id, Model *model)
      : Block(id, model, BlockType::open_loop_coronary_bc,
              BlockClass::boundary_condition,
              {{"Ra1", InputParameter()},
               {"Ra2", InputParameter()},
               {"Rv1", InputParameter()},
               {"Ca", InputParameter()},
               {"Cc", InputParameter()},
               {"t", InputParameter(false, true)},
               {"Pim", InputParameter(false, true)},
               {"P_v", InputParameter()},
               {"closed_loop_outlet", InputParameter(true, false, false)}}) {}
Therefore, I switched my .json file to be as follows, and I got the simulation running.

Code: Select all

{
    "simulation_parameters": {
        "coupled_simulation": true,
        "number_of_time_pts": 100,
        "output_all_cycles": true,
        "steady_initial": false
    },
    "boundary_conditions": [
        {
            "bc_name": "RCR",
            "bc_type": "CORONARY",
            "bc_values": {
                "Ra1": 82923.6,
                "Ra2": 134751,
                "Rv1": 41461.8,
                "Ca": 8.55939e-07,
                "Cc": 6.92532e-06,
                "P_v": 0,
                "Pim": [...],
                "t": [...]
            }
        }
    ],
    "external_solver_coupling_blocks": [
        {
            "name": "RCR_coupling",
            "type": "FLOW",
            "location": "inlet",
            "connected_block": "RCR",
            "periodic": false,
            "values": {
                "t": [0.0, 1.0],
                "Q": [1.0, 1.0]
            }
        }
    ],
    "junctions": [],
    "vessels": []
}
I believe I must be doing something wrong in my dict and I am not parsing right the variables for the CORONARY BC, but I am not sure where I am doing a mistake.

Thanks a lot again in advance!

I have compiled svZeroDSolver and svFSIPlus from source as of today ~9am ET. All the test in the fluid folder are running ok after I convert the meshes to ASCII format.

Thanks!

POST REPLY