Go to the documentation of this file.
62 #include "TCondicionContorno.h"
63 #include "TDeposito.h"
64 #include "TBloqueMotor.h"
65 #include "TCCUnionEntreTubos.h"
66 #include "TCCCilindro.h"
67 #include "TCCDeposito.h"
88 stFunDisCar(
double a0,
double a1,
double v0,
double v1,
double dt,
double sg) {
96 double operator()(
double x) {
99 double a = A_0 * xx + A_1 * x;
100 double v = V_0 * xx + V_1 * x;
101 return x - (a - v) * D_t;
103 double a = A_0 * x + A_1 * xx;
104 double v = V_0 * x + V_1 * xx;
105 return xx - (a + v) * D_t;
133 double FLongitudTotal;
136 nmTipoMallado FTipoMallado;
139 double *FDiametroTubo;
140 double *FDiametroD12;
141 double *FDiametroS12;
147 double *FDerLinArea12;
150 int FNumeroConductos;
155 nmTipoTransCal FTipoTransCal;
156 double FCoefAjusFric;
158 double FEspesorIntPrin;
159 double FEspesorExtPrin;
161 double FDensidadPrin;
164 double FTRefrigerante;
165 nmRefrigerante FTipRefrig;
167 nmTipoCalcTempParedTubos FTipoCalcTempPared;
168 double FTIniParedTub;
170 double *FCoefTurbulencia;
171 double ***FSUMTPTuboPro;
185 double *FResistRadInt;
186 double *FResistRadExt;
187 double *FResistAxiAnt;
188 double *FResistAxiPos;
204 double *FVelocidadDim;
206 double *FTemperature;
215 double *FVelocidadMedia;
216 double *FAsonidoMedia;
217 double *FPresionMedia;
259 nmTipoCalculoEspecies FCalculoEspecies;
260 nmCalculoGamma FCalculoGamma;
261 double *FComposicionInicial;
262 double **FFraccionMasicaEspecie;
263 double **FFraccionMasicaCC;
269 double *FVelocidadCC;
289 double *FCourantLocal;
298 double FTiempoMedSUM;
299 double FControlResMed;
301 int FNumDistSensores;
303 double FAnguloTotalCiclo;
304 double FRegimenFicticio;
308 double FDuracionCiclo;
309 int FNumCiclosSinInerciaTermica;
311 TDPF *FDPFSalidaTubo;
312 TDPF *FDPFEntradaTubo;
324 void CalculoPuntosMalla(
double ene
330 void Transforma1(
const double& v,
335 const double& Gamma1,
341 void Transforma1Area(
const double& v,
347 const double& Gamma1,
353 void Transforma2(
double& v,
358 const double& Gamma1,
364 void Transforma2Area(
double& v,
370 const double& Gamma1,
376 void Transforma3Area(
double** Ufct,
386 void Transforma4Area(
double** U1,
398 double Maximo(
double x,
403 double Minimo(
double x,
411 void LaxWendroffArea();
414 void FluxCorrectedTransport();
417 void CalculaFlujo(
double** U,
425 void CalculaFuente1(
double** U,
433 void CalculaFuente1Area(
double** U,
441 void CalculaFuente2(
double** U,
447 double* TempParedTubo,
455 void CalculaFuente2Area(
double** U,
461 double* TempParedTubo,
469 double DerLinF(
double d1,
475 double DerLinFArea(
double area1,
481 void Colebrook(
double rug,
488 void TransmisionCalor(
double tgas,
497 void TransformaContorno(
double& L,
504 const double& Gamma1,
505 const double& Gamma3,
506 const double& Gamma4,
511 double CalculaNIT(
double a,
515 double Gamma,
double Rmezcla);
520 void Calculo_Entropia(
double& entropia,
530 void Calculo_Caracteristica(
double& caracteristica,
550 void CalculaMatrizJacobiana();
553 void TVD_Estabilidad();
556 void TVD_Limitador();
561 void DimensionaTVD();
564 double Limita(
double r
603 int getNumeroConductos() {
604 return FNumeroConductos;
621 nmTipoTransCal getTipoTransCal() {
622 return FTipoTransCal;
625 double getCoefAjustTC() {
629 double getCoefAjustFric() {
630 return FCoefAjusFric;
633 double getFriccion() {
637 double getEmisividad() {
641 bool getConcentrico() {
645 double getDuracionCiclo() {
646 return FDuracionCiclo;
649 double getNumCiclosSinInerciaTermica() {
650 return FNumCiclosSinInerciaTermica;
653 nmTipoCalcTempParedTubos getTipoCalcTempPared() {
654 return FTipoCalcTempPared;
657 double getAnguloTotalCiclo() {
658 return FAnguloTotalCiclo;
665 double getEspesorIntPrin() {
666 return FEspesorIntPrin;
669 double getConductPrin() {
673 double getEspesorPrin() {
677 double getDensidadPrin() {
678 return FDensidadPrin;
681 double getCalEspPrin() {
685 bool getHayDPFNodoDer() {
686 return FHayDPFNodoDer;
689 bool getHayDPFNodoIzq() {
690 return FHayDPFNodoIzq;
698 return FDPFEntradaTubo;
701 TDPF* getDPFSalida() {
702 return FDPFSalidaTubo;
705 int getNodoDPFEntrada() {
706 return FNodoDPFEntrada;
709 int getNodoDPFSalida() {
710 return FNodoDPFSalida;
863 void PutTPTubo(
int k,
int i,
double valor);
956 return FFraccionMasicaCC[j][i];
963 return FVelocidadCC[i];
970 return FDensidadCC[i];
1015 nmFormulacionLeyes getFormulacionLeyes() {
1016 return FMod.FormulacionLeyes;
1053 return FTipoCanal[i];
1057 void PutConcentric(
double valor) {
1058 valor == 0 ? FConcentrico = false : FConcentrico =
true;
1067 TTubo(
int SpeciesNumber,
1069 double SimulationDuration,
1071 nmTipoCalculoEspecies SpeciesModel,
1072 nmCalculoGamma GammaCalculation,
1098 double AmbientTemperature
1203 double AmbientPressure,
1204 double AmbientTemperature
1222 return FFraccionMasicaEspecie[j][i];
void ActualizaValoresNuevos(TCondicionContorno **BC)
int getNodoDer() const
Gets the right-hand side node.
a Finite differences pipe.
void CalculaVariablesFundamentales()
double FTime1
Time at following time step.
void CalculaCoeficientePeliculaExterior(TBloqueMotor **Engine, double AmbientPressure, double AmbientTemperature)
double getLongitudTotal() const
Gets the total length of the pipe.
double getTemperaturaInicial() const
Gets the initial temperature.
double GetGamma(int i) const
Gets the specific heat capacities ratio at a given cell.
double getTime1() const
Gets the time at the following time-step.
double getTempWallIni() const
Gets the initial temperature of the wall.
void HeaderInstantaneousResults(std::stringstream &insoutput, stEspecies *DatosEspecies) const
double GetCoefTurbulencia(int i) const
Gets the turbulence coefficient.
void InicializaCaracteristicas(TCondicionContorno **BC)
double GetTPTuboAnt(int j, int) const
Gets the previous wall temperature at a given cell and node.
double Interpola_Caracteristica(double entropia, int signo, int extremo, double DeltaTiempo)
double FDeltaTime
Time step.
void LeeDatosGeometricosTubo(const char *FileWAM, fpos_t &filepos, double ene, int tipomallado, TBloqueMotor **Engine)
double GetDiametro(int i) const
Gets the cell diameter.
void PutDeltaTime(double valor)
Sets the time step.
void ImprimeResultadosInstantaneos(std::stringstream &insoutput) const
void CalculaCaracteristicasExtremos(TCondicionContorno **BC, double DeltaTiempo)
void HeaderAverageResults(std::stringstream &medoutput, stEspecies *DatosEspecies) const
void ComunicacionDPF(TCondicionContorno **CC, TDeposito **Deposito)
double GetVelocidad(int i) const
Gets the fluid speed.
void ImprimeResultadosMedios(std::stringstream &medoutput) const
double GetFraccionMasicaCC(int j, int i)
double GetFraccionMasicaInicial(int i) const
Gets the initial mass fraction of species i.
double GetPresion(int i) const
Gets the fluid pressure.
void CalculaResistenciasdePared(TCondicionContorno **BC)
double GetTPTubo(int j, int i) const
Gets the wall temperature at a given cell and node.
double GetVelPro(int i) const
Gets the integrated gas velocity.
double GetCpMezcla(int i) const
Gets the specific heat capacity at constant pressure at a given cell.
double getDeltaTime() const
Gets the time step.
double GetCvMezcla(int i) const
Gets the specific heat capacity at constant volume at a given cell.
void SalidaGeneralTubos(stEspecies *DatosEspecies) const
void PutTPTubo(int k, int i, double valor)
Sets the wall temperature at a given cell and node.
double GetU0(int i, int j)
double FTime0
Time at current time step.
void AjustaPaso(double Intervalo)
double getTime0() const
Gets the current time.
double getMallado() const
Gets the mesh size.
void ComunicacionTubo_CC(TCondicionContorno **BC)
void PutTime1(double valor)
Sets the time after the following time-step.
double GetDensidadCC(int i)
void ReduccionFlujoSubsonico()
void CalculaTemperaturaPared(TBloqueMotor **Engine, double Theta, double CrankAngle, TCondicionContorno **BC)
void LeeDatosGeneralesTubo(const char *FileWAM, fpos_t &filepos)
void IniciaVariablesFundamentalesTubo()
double GetDensidad(int i) const
Gets the density.
void IniciaVariablesTransmisionCalor(TCondicionContorno **BC, TBloqueMotor **Engine, double AmbientTemperature)
void PutVelPro(int i, double valor)
Sets the integrated gas velocity.
void CalculaResultadosMedios(double Theta)
void ReadInstantaneousResultsTubo(const char *FileWAM, fpos_t &filepos, bool HayMotor)
double GetRMezcla(int i) const
Gets the gas constant of the mixture at a given cell.
int getNumeroTubo() const
Gets the pipe id.
double GetVelocidadCC(int i)
void CalculaCoeficientePeliculaInterior(TCondicionContorno **BC)
double GetFraccionMasica(int j, int i)
double getPresionInicial() const
Gets the initial pressure.
double Interpola_Entropia(nmPipeEnd TipoExtremoTubo, double DeltaTiempo)
double GetAsonido(int i) const
Gets the speed of sound.
double getVelocidadMedia() const
Gets the mean speed.
void ActualizaPropiedadesGas()
void PutTime0(double valor)
Sets the current time.
double GetArea(int i) const
Gets the cross section at a given cell.
void EstabilidadMetodoCalculo()
void ReduccionFlujoSubsonicoFCT()
void ReadAverageResultsTubo(const char *FileWAM, fpos_t &filepos, bool HayMotor)
int getNodoIzq() const
Gets the left-hand side node.
TTubo(int SpeciesNumber, int j, double SimulationDuration, TBloqueMotor **Engine, nmTipoCalculoEspecies SpeciesModel, nmCalculoGamma GammaCalculation, bool ThereIsEGR)
void CalculaResultadosInstantaneos()