CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Adding a new member function to SingleStepCombustion

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2013, 03:37
Default Adding a new member function to SingleStepCombustion
  #1
New Member
 
Tatu Pinomaa
Join Date: Oct 2012
Location: Finland
Posts: 16
Rep Power: 13
tatu is on a distinguished road
Hi!

I'm trying to add a new method to singleStepCombustion. The goal is to output reaction rate matrix for a specie transport equation, where the solved field is rho*Yi, instead of bare Yi (mass fraction of specie i). This is done for a modified rhoCentralFoam to handle specie transport. I thought this could be done by simply implementing the member function in singleStepCombustion.C as follows:
Code:
template<class CombThermoType, class ThermoType>
Foam::tmp<Foam::fvScalarMatrix>
singleStepCombustion<CombThermoType, ThermoType>::Rrho
(
    const volScalarField& Y,
    const volScalarField& rhoY
) const
{
    const label specieI = this->thermo_->composition().species()[Y.name()];

    const volScalarField wSpecie
    (
        wFuel_*singleMixture_.specieStoichCoeffs()[specieI]
    );

    return wSpecie + fvm::Sp(0.0*wSpecie, rhoY);
}
Then I would add the function definition to singleStepCombustion.H:
Code:
virtual tmp<fvScalarMatrix> Rrho(const volScalarField& Y, const volScalarField& rhoY) const;
And finally add the definition to combustionModel.H:
Code:
virtual tmp<fvScalarMatrix> Rrho(const volScalarField& Y, const volScalarField& rhoY) const = 0;
I understand that this is all I have to do: I can't find other dependencies where the member function should be defined. Then I compile the combustionModel folder (wmake libso), and no errors or warnings are produced. If I then try to call the new member function with combustion->Rrho(Yi,rhoYi) inside the solver (analogically to working call combustion->R(Yi) ), and compile (wmake), I get the following error:
Code:
YEqn.H: In function ‘int main(int, char**)’:
YEqn.H:73:30: error: ‘class Foam::combustionModels::psiCombustionModel’ has no member named ‘Rrho’
I don't understand why the new member function isn't recognized. Did I forgot to add the member function definition somewhere? I've tried to look through everywhere I think it might be missing. I'm using OF 2.1.1, but the files from 2.1.x I added should be pretty much identical.

Tatu
tatu is offline   Reply With Quote

Old   January 8, 2014, 23:54
Default
  #2
Member
 
Thamali
Join Date: Jul 2013
Posts: 67
Rep Power: 13
Thamali is on a distinguished road
Hi tatu,
Did you solve your problem,although it is a long time to keep a problem?
If so I have a question for you.
Thanks.
Thamali
Thamali is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56
issue compiling new turbulence model perplexed user OpenFOAM Programming & Development 1 January 13, 2012 03:40
LiencubiclowRemodel nzy102 OpenFOAM Bugs 14 January 10, 2012 08:53
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51
[OpenFOAM] LibvtkFoamso fred ParaView 2 November 18, 2005 19:01


All times are GMT -4. The time now is 14:16.