|
[Sponsors] |
June 2, 2016, 11:19 |
Reactingfoam, autowrite reaction rate
|
#1 |
New Member
Mr.liu
Join Date: Sep 2012
Posts: 27
Rep Power: 13 |
Hi, i am a new former and i meet a problem when i want to autowrite CH4 reaction rate like U or Yi. (Openfoam 2.3.0, reactingfoam)
First i added this code in the CreatField.H, volScalarField Rrate ( IOobject ( "Rrate", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("Rrate", dimMass/dimVolume/dimTime, 0.0) ); Then, i added this code in YEqn, forAll(Y, i) { if (Y[i].name() != "CH4") Rrate = reaction->R(Yi); } After wmake, it shows YEqn.H:26:14: error: no match for ‘operator=’ (operand types are ‘Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}’ and ‘Foam::tmp<Foam::fvMatrix<double> >’) Rrate = reaction->R(Yi); Can anybody tell me how to do that? Thank you very much. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Implement code to calculate the reaction rate in reactingFoam | matari | OpenFOAM Programming & Development | 17 | November 16, 2018 09:43 |
PaSR + infinite reaction rate in reactingFoam --> no reactions occurring | tatu | OpenFOAM Running, Solving & CFD | 2 | November 24, 2016 18:34 |
Defining reaction rate with multiple surface reaction | Fred Marias | FLUENT | 1 | September 12, 2013 04:56 |
Segmentation fault in running alternateSteadyReactingFoam,why? | NewKid | OpenFOAM | 18 | January 20, 2011 16:55 |
chemical reaction - decompostition | La S. Hyuck | CFX | 1 | May 23, 2001 00:07 |