/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . \*---------------------------------------------------------------------------*/ #include "FlameStructure.H" #include "IFstream.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // const Foam::CMC::dataType Foam::CMC::FlameStructure::staticData(); // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::CMC::FlameStructure::FlameStructure(word fileName) : names_(), Y_(), W_(), T_(), Q_(), h_(), rho_(), Rgas_() { IFstream slfmFile (fileName); word garbage; word yname; // number of eta grids and species label nEta(0); label nY(0); slfmFile.getLine(garbage); //INPUT FILE FOR THE SR-CMC ROUTINES slfmFile.getLine(garbage); //No.GRID POINTS No. SPECIES slfmFile >> nEta >> nY; Y_.setSize(nY); W_.setSize(nY); eta_.setSize(nEta); T_.setSize(nEta); Q_.setSize(nEta); h_.setSize(nEta); rho_.setSize(nEta); Rgas_.setSize(nEta); slfmFile.getLine(garbage); //blank line (trailing white spaces) slfmFile.getLine(garbage); //PRESSURE(ATM) slfmFile.getLine(garbage); //1.0 slfmFile.getLine(garbage); //MIXTURE FRACTION GRID scalarField YTemp(nEta,0); scalarField WTemp(nEta,0); for(label j=0 ; j> eta_[j]; } slfmFile.getLine(garbage); //blank line (trailing white spaces) slfmFile.getLine(garbage); //INITIAL CONDITIONS for(label i=0; i> yname; names_.append(yname); //species mass fractions for(label j=0 ; j> YTemp[j]; } Y_.set(i, new scalarField(YTemp)); //species production rates for(label j=0 ; j> WTemp[j]; } W_.set(i, new scalarField(WTemp)); slfmFile.getLine(garbage); //blank line (trailing white spaces) } //read temperature slfmFile >> yname; for(label j=0 ; j> T_[j]; T_[j] = max(0.0, T_[j]); } for(label j=0 ; j> Q_[j]; } /* // calcuate rather than read //read density slfmFile >> yname; for(label j=0 ; j> rho_[j]; } //read enthalpy slfmFile >> yname; for(label j=0 ; j> Rgas_[j]; } */ /* Interpolation(etaValue, eta, 1, nY+1, yi_temp, yi); for(label j = 0 ; j<=etamax ; j++) { for(label i = 0 ; icalculateRHOCMC(QiCMCin , Tin, Pin); QhCMC[j+k*(etamax+1)] = chemistry->calculateHCMC(QiCMCin , Tin, rhoCMC[ j+k*(etamax+1)], Pin); } } */ } Foam::CMC::FlameStructure::FlameStructure(const FlameStructure&) // : // baseClassName(), // data_() {} // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // /* Foam::autoPtr Foam::CMC::FlameStructure::New() { return autoPtr(new FlameStructure); } */ // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::CMC::FlameStructure::~FlameStructure() {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // void Foam::CMC::FlameStructure::operator=(const FlameStructure& rhs) { // Check for assignment to self if (this == &rhs) { FatalErrorInFunction << "Attempted assignment to self" << abort(FatalError); } } // * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * // // ************************************************************************* //