Beispiel #1
0
        public OutComp calcNewPos(Comp comp, float fu, float fl, float vc, float pos0, QuantityType natUnits, bool limit, float maxpos, QuantityType limitUnits)
        {
            OutComp   outcomp = new OutComp();
            float     flow;
            float     ret;
            float     rettime;
            float     vceff;
            PhaseType phase = new PhaseType();
            float     elutable;
            float     lf   = inParams.lf;
            float     uf   = inParams.uf;
            float     px   = inParams.px;
            KdefType  kdef = inParams.kDefinition;
            float     k    = comp.k;

            // * flow
            if (natUnits == QuantityType.Steps)
            {
                flow = Equations.calcStepFlow(kdef, lf, uf, fu, fl, k);
            }
            else
            {
                flow = Equations.calcFlow(kdef, fu, fl, k);
            }

            if (inParams.runMode != RunModeType.CoCurrent)
            {
                elutable = Equations.calcElutable(kdef, fu, -fl, k);
            }
            else
            {
                elutable = Equations.calcElutable(kdef, fu, fl, k);
            }

            if (elutable > 0.01)
            {
                // will elute
                // * vceff
                if (flow < 0)
                {
                    vceff = pos0;
                }
                else
                {
                    vceff = vc - pos0;
                }
                // * ret
                // [time]
                rettime = Equations.calcPos(kdef, vceff, lf, uf, flow, k);
                outcomp.retentionTime = rettime;
                if (rettime < 0)
                {
                    phase = PhaseType.Lower;
                }
                else
                {
                    phase = PhaseType.Upper;
                }

                if (natUnits == QuantityType.Steps)
                {
                    // [steps]
                    ret = rettime;
                }
                else
                {
                    // [volume] or [time]
                    ret = inParams.convertUnit(rettime, QuantityType.Time, natUnits, phase);
                }
                outcomp.retention0 = ret;
                // * new pos
                if (limit && (Math.Abs(rettime) > maxpos && limitUnits == QuantityType.Time || Math.Abs(ret) > maxpos && limitUnits != QuantityType.Time))
                {
                    // [volume] or [steps]
                    outcomp.retention = pos0 + Equations.calcColPos(kdef, maxpos, lf, uf, flow, k);
                    outcomp.eluted    = false;
                }
                else
                {
                    outcomp.retention = ret;
                    outcomp.eluted    = true;
                }
            }
            else
            {
                outcomp.retention = pos0;
                if (flow < 0)
                {
                    phase = PhaseType.Lower;
                }
                else
                {
                    phase = PhaseType.Upper;
                }
            }
            outcomp.phase = phase;
            return(outcomp);
        }
Beispiel #2
0
 public ControlComp(Comp comp)
     : base(comp)
 {
     init();
 }
Beispiel #3
0
 public OutComp calcNewPos(Comp comp, float fu, float fl, float vc, float pos0, QuantityType natUnits)
 {
     return(calcNewPos(comp, fu, fl, vc, pos0, natUnits, false, 0, QuantityType.Column));
 }
Beispiel #4
0
 public OutComp(Comp comp)
     : base(comp)
 {
     reset();
 }