75 if (_serviceable_node->getBoolValue()) {
76 double p_new = _pressure_in_node->getDoubleValue();
77 double p = _pressure_out_node->getDoubleValue();
82 double trat = _tau ? dt/_tau : SGLimitsd::max();
84 double proj_factor = 0;
89 beta = _beta_node->getDoubleValue() * SGD_DEGREES_TO_RADIANS;
90 proj_factor = sin(beta);
94 alpha = _alpha_node->getDoubleValue() * SGD_DEGREES_TO_RADIANS;
95 beta = _beta_node->getDoubleValue() * SGD_DEGREES_TO_RADIANS;
96 proj_factor = sqrt( 1.0 - cos(beta)*cos(beta) * cos(alpha)*cos(alpha) );
99 if ( (_type ==1) || (_type == 2) ) {
100 mach = _mach_node->getDoubleValue();
101 pt = p_new * pow(1 + 0.2 * mach*mach*proj_factor*proj_factor, 3.5 );
102 qc_part = (pt - p_new) * _error_factor ;
103 p_new = p_new + qc_part;
106 _pressure_out_node->setDoubleValue(