CFD Online Logo CFD Online URL
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

LinkBack Thread Tools Display Modes
Old   February 15, 2013, 04:37
Default Adding a new member function to SingleStepCombustion
New Member
Tatu Pinomaa
Join Date: Oct 2012
Location: Finland
Posts: 16
Rep Power: 7
tatu is on a distinguished road

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:
template<class CombThermoType, class ThermoType>
singleStepCombustion<CombThermoType, ThermoType>::Rrho
    const volScalarField& Y,
    const volScalarField& rhoY
) const
    const label specieI = this->thermo_->composition().species()[];

    const volScalarField wSpecie

    return wSpecie + fvm::Sp(0.0*wSpecie, rhoY);
Then I would add the function definition to singleStepCombustion.H:
virtual tmp<fvScalarMatrix> Rrho(const volScalarField& Y, const volScalarField& rhoY) const;
And finally add the definition to combustionModel.H:
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:
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 is offline   Reply With Quote

Old   January 9, 2014, 00:54
Join Date: Jul 2013
Posts: 62
Rep Power: 6
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.
Thamali is offline   Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

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

All times are GMT -4. The time now is 06:47.