Mechanical ventilator source with respiratory model source

I’m using both the mechanical ventilator model and the respiratory model for a project I’m working on. One aspect that I’m unclear about is how the driver sources are combined when both models are active. Specifically, the mechanical ventilator applies a flow or pressure source, while the respiratory model uses a pressure source for natural breathing.

What happens to the respiratory model’s pressure source when the mechanical ventilator is connected and providing its own flow or pressure source? Is the respiratory pressure source removed, and if so, what is it replaced with?

The respiratory and mechanical ventilator driver sources have combined effects when both are active. They are set separately, and the circuit solver calculates the resulting fluid mechanics of the combined closed-loop circuit. The respiratory spontaneous muscle driver pressure source is never removed but remains set to zero when the patient is apneic (which can be applied with a dyspnea severity of 1.0). You will want to take care when setting the mechanical ventilator trigger values if the patient is spontaneously breathing.

You might find the Mechanical Ventilator How-To example helpful.

Thank you - I think I’m starting to understand how the mechanics are set. To follow up, in this example from Mechanical Ventilator How-To, the mechanical ventilator waveform is set. How is the respiratory pressure source set since it’s still connected to the circuit? I understand how it’s defined by the user when using the respiratory model, but I’m not sure how it’s defined when connected to the ventilator?

SEMechanicalVentilatorVolumeControl vc_ac;
vc_ac.SetConnection(eSwitch::On);
vc_ac.SetMode(eMechanicalVentilator_VolumeControlMode::AssistedControl);
vc_ac.SetInspirationWaveform(eDriverWaveform::DescendingRamp);
vc_ac.GetFlow().SetValue(60.0, VolumePerTimeUnit::L_Per_min);
vc_ac.GetFractionInspiredOxygen().SetValue(0.21);
vc_ac.GetInspiratoryPeriod().SetValue(1.0, TimeUnit::s); //This is optional
vc_ac.GetPositiveEndExpiratoryPressure().SetValue(5.0, PressureUnit::cmH2O);
vc_ac.GetRespirationRate().SetValue(12.0, FrequencyUnit::Per_min);
vc_ac.GetTidalVolume().SetValue(900.0, VolumeUnit::mL);
vc_ac.GetSlope().SetValue(0.2, TimeUnit::s);

The respiratory spontaneous muscle driver pressure is set in the Respiratory system. A combination of chemoreceptors and other feedback mechanisms determines the amplitude and frequency. The mechanical ventilator and respiratory systems modify a single combined circuit simultaneously before being solved each time-step.

The RespiratoryMechanicsConfiguration action can be used to override and directly set properties of the respiratory pressure source waveform. There is an example of this in the Respiratory Mechanics How-To. It’s usually not recommended to use this because it could cause unrealistic simulations.