Hi everyone,
I’m currently working on coupling two models for lung simulation: a first model coded in Python that calculates the evolution of pressure in the respiratory system using finite elements, and a second model coded in Julia that focuses more specifically on volumic transfers from alveoli to blood.
Thus, in my simulation, an increment proceeds as follows:
- First, the first Python model calculates the pressures at the ends of the respiratory system.
- Then, these pressures are read as initial conditions for the second Julia model, which calculates volumes at the alveoli.
- Finally, the first model is updated with the Julia data, and the next increment can begin.
My problem is that during the same increment, I read a line from a volumes.csv file, calculate with my Python model, write a line to another pressures.csv file, read the pressures.csv file, calculate with my Julia model, and finally write to the volumes.csv file.
Do you know of a more suitable way of storing this data and transferring it from one model to another?
Thanks in advance for your reply, and have a nice day,