Esempio n. 1
0
        public Model()
        {
            _dialysingFluidFlowCombinator = new DialyzingFluidFlowCombinator();
            _bloodFlowCombinator          = new BloodFlowCombinator();

            HdMachine = new HdMachine
            {
            };

            Patient = new Patient
            {
            };

            HdMachine.AddFlows(_dialysingFluidFlowCombinator, _bloodFlowCombinator);

            _bloodFlowCombinator.ConnectOutWithIn(HdMachine.ToPatientVein, Patient.VeinFlow);
            _bloodFlowCombinator.ConnectOutWithIn(Patient.ArteryFlow, HdMachine.FromPatientArtery);
            _bloodFlowCombinator.CommitFlow();
            _dialysingFluidFlowCombinator.CommitFlow();
        }
Esempio n. 2
0
 public void AddFlows(DialyzingFluidFlowCombinator dialysingFluidFlowCombinator, BloodFlowCombinator bloodFlowCombinator)
 {
     //Dialysate
     DialyzingFluidDeliverySystem.AddFlows(dialysingFluidFlowCombinator);
     //Blood
     bloodFlowCombinator.ConnectOutWithIn(FromPatientArtery,
                                          ExtracorporealBloodCircuit.FromPatientArtery);
     ExtracorporealBloodCircuit.AddFlows(bloodFlowCombinator);
     bloodFlowCombinator.ConnectOutWithIn(ExtracorporealBloodCircuit.ToPatientVein,
                                          ToPatientVein);
     //Insert Stubs
     bloodFlowCombinator.ConnectOutWithIn(ExtracorporealBloodCircuit.ToDialyzer,
                                          Dialyzer.BloodFlow);
     bloodFlowCombinator.ConnectOutWithIn(Dialyzer.BloodFlow,
                                          ExtracorporealBloodCircuit.FromDialyzer);
     dialysingFluidFlowCombinator.ConnectOutWithIn(DialyzingFluidDeliverySystem.ToDialyzer,
                                                   Dialyzer.DialyzingFluidFlow);
     dialysingFluidFlowCombinator.ConnectOutWithIn(Dialyzer.DialyzingFluidFlow,
                                                   DialyzingFluidDeliverySystem.FromDialyzer);
 }