public double Tforkseeker(double k, bool halp) { double PomT = 4, dk = 0, dkpom = 100000, k1 = 0; scalingParameters = new ScalingParameters(); while (true) { if (PomT <= 20 && halp == false) { k1 = scalingParameters.Lowtemptemptok(PomT); } if (PomT > 20 && PomT <= 32 && halp == false) { k1 = scalingParameters.Midtemptemptok(PomT); } if (PomT > 32 && halp == false) { k1 = scalingParameters.Hightemptemptok(PomT); } if (halp == true) { k1 = scalingParameters.Maxtemptemptok(PomT); } //k1 = apomT + b dk = Math.Abs(k - k1); if (dk > dkpom) { break; } else { if (PomT <= 20) { } PomT = PomT + 0.1; dkpom = dk; } if (PomT > 40) { break; } } PomT = Math.Round(PomT, 1); return(PomT); }
public double TforHzseeker(double freq, bool halp) { double PomT = 4, dfreq = 0, dfreqpom = 100000, freq1 = 0; scalingParameters = new ScalingParameters(); while (true) { if (PomT <= 20 && halp == false) { freq1 = scalingParameters.Lowtemptemptofreq(PomT); } if (PomT > 20 && PomT <= 32 && halp == false) { freq1 = scalingParameters.Midtemptemptofreq(PomT); } if (PomT > 32 && halp == false) { freq1 = scalingParameters.Hightemptemptofreq(PomT); } if (halp == true) { freq1 = scalingParameters.Maxtemptemptofreq(PomT); } //k1 = apomT + b dfreq = Math.Abs(freq - freq1); if (dfreq > dfreqpom) { break; } else { PomT = PomT + 0.1; dfreqpom = dfreq; } if (PomT > 40) { break; } } return(PomT); }
public double Tforlambdaseeker(double lambda, bool halp) { double PomT = 4, dlambda = 0, dlambdapom = 100000, lambda1 = 0; scalingParameters = new ScalingParameters(); while (true) { //k1 = apomT + b if (PomT <= 20 && halp == false) { lambda1 = scalingParameters.Lowtemptemptolambda(PomT); } if (PomT > 20 && PomT <= 32 && halp == false) { lambda1 = scalingParameters.Midtemptemptolambda(PomT); } if (PomT > 32 && halp == false) { lambda1 = scalingParameters.Hightemptemptolambda(PomT); } if (halp == true) { lambda1 = scalingParameters.Maxtemptemptolambda(PomT); } dlambda = Math.Abs(lambda - lambda1); if (dlambda > dlambdapom) { break; } else { PomT = PomT + 0.1; dlambdapom = dlambda; } if (PomT > 40) { break; } } return(PomT); }