34 #pragma package(smart_init) 42 FInletPipeID = InletPipeID;
44 FOutletPipeID = OutletPipeID;
45 FRotorVolumeID = RotorVolumeID;
46 FStatorVolumeID = StatorVolumeID;
55 double a = FInletPipe->
GetAsonido(0) * __cons::ARef;
59 double p0 = p * pow(1 + (g - 1) / 2 *
pow2(v / a), g / (g - 1));
64 double TAcousticCompressor::P1() {
72 int n = FOutletPipe->getNin() - 1;
75 double a = FOutletPipe->
GetAsonido(n) * __cons::ARef;
79 double p0 = p * pow(1 + (g - 1) / 2 *
pow2(v / a), g / (g - 1));
86 int n = FOutletPipe->getNin() - 1;
95 double a = FInletPipe->
GetAsonido(0) * __cons::ARef;
100 double T0 = (
pow2(a) + (g - 1) / 2 *
pow2(v)) / g / R;
108 int n = FOutletPipe->getNin() - 1;
110 double a = FOutletPipe->
GetAsonido(n) * __cons::ARef;
111 double g = FOutletPipe->
GetGamma(n);
114 return a * a / g / R;
118 double TAcousticCompressor::T20() {
120 int n = FOutletPipe->getNin() - 1;
122 double a = FOutletPipe->
GetAsonido(n) * __cons::ARef;
123 double g = FOutletPipe->
GetGamma(n);
127 double T0 = (
pow2(a) + (g - 1) / 2 *
pow2(v)) / g / R;
133 double TAcousticCompressor::T1() {
135 double a = FInletPipe->
GetAsonido(0) * __cons::ARef;
139 return a * a / g / R;
143 double TAcousticCompressor::CompRatio() {
147 void TAcousticCompressor::PutHeatPower(
double Power) {
148 FStatorVolume->PutHeatPower(Power);
151 void TAcousticCompressor::PutHeatPowerIn(
double Power) {
152 FRotorVolume->PutHeatPower(Power);
155 void TAcousticCompressor::AsignElementsID(
int InletPipeID,
int VoluteID,
int OutletPipeID,
int RotorVolumeID,
156 int StatorVolumeID) {
158 FInletPipeID = InletPipeID;
159 FVoluteID = VoluteID;
160 FOutletPipeID = OutletPipeID;
161 FRotorVolumeID = RotorVolumeID;
162 FStatorVolumeID = StatorVolumeID;
165 double TAcousticCompressor::CRCorrector() {
168 double a = FVolute->
GetAsonido(0) * __cons::ARef;
172 double p20out = p * pow(1 + (g - 1) / 2 *
pow2(v / a), 2 * g / (g - 1));
174 double Correction = p20out *
P10() / FRotorVolume->getPressure() /
P20();
180 double TAcousticCompressor::EFCorrector(
double rcorr,
double rorig) {
182 double g = FRotorVolume->getGamma();
188 double Correction = __units::degCToK(FRotorVolume->getTemperature()) /
T10() * (pow(rorig * rcorr,
189 (g - 1) / g) - 1) / (pow(rorig, (g - 1) / g) - 1);
195 double TAcousticCompressor::MassFlow() {
198 double a = FVolute->
GetAsonido(0) * __cons::ARef;
201 double S = FVolute->
GetArea(0);
203 double Mass = __units::BarToPa(p) * g * v * S / a / a;
209 double TAcousticCompressor::Efficiency() {
211 double eff =
T10() * (pow(CompRatio(), (g - 1) / g) - 1) / (T20() -
T10());
216 double TAcousticCompressor::Din() {
double P10()
Compute the total pressure at compressor inlet.
double GetArea(int i) const
Gets the cross section at a given cell.
double T2()
Compute the temperature at compressor outlet.
double GetDiametro(int i) const
Gets the cell diameter.
double GetGamma(int i) const
Gets the specific heat capacities ratio at a given cell.
double GetPresion(int i) const
Gets the fluid pressure.
double P2()
Compute the pressure at compressor outlet.
T pow2(T x)
Returns x to the power of 2.
double GetVelocidad(int i) const
Gets the fluid speed.
double P20()
Compute the total pressure at compressor outlet.
double GetRMezcla(int i) const
Gets the gas constant of the mixture at a given cell.
double T10()
Compute the total temperature at compressor inlet.
double GetAsonido(int i) const
Gets the speed of sound.