|
[Sponsors] |
Reaction rate depending on the temperature field |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 9, 2014, 04:48 |
Reaction rate depending on the temperature field
|
#1 |
Member
Thamali
Join Date: Jul 2013
Posts: 67
Rep Power: 12 |
Hi all,
I am trying to apply a reaction rate depending on the temperature of the solid phase for my new solver. After runnig "wmake" it shows some errors.Can someone help me on finding the error. my code is to calculate the "dryingRate" depending on the temperature.
my code is as follows, forAll(ts,celli) //ts is a volScalarField { if(ts[celli]<hunderdCel.value()) //this is 373K {dimensionedScalar dryingRate[celli]=scalar(6)*massTransCoeff[celli]*(Ymoist[celli]*rhos[celli]-YH2O[celli]*rho)/F; //return dryingRate[celli]; } else if(ts[celli]=(hunderdCel.value())) { dimensionedScalar dryingRate[celli]=scalar(6)*(convectiveHeatTransCoeff[celli] *(tg[celli] -ts[celli] )+scalar(0.9)*stephBoltz*(pow(298.15,4)-pow(ts[celli] ,4)))/(F*VapHeat); //return dryingRate[celli]; } //else(ts[celli]>hunderdCel.value()); else {dimensionedScalar dryingRate=Zero;} //return dryingRate[celli];} } please see whether can someone find the error.The error is as follows, createFields.H:1046:115: error: variable-sized object ‘dryingRate’ may not be initialized {dimensionedScalar dryingRate[celli]=scalar(6)*massTransCoeff[celli]*(Ymoist[celli]*rhos[celli]-YH2O[celli]*rho)/F; ^ createFields.H:1046:21: warning: unused variable ‘dryingRate’ [-Wunused-variable] {dimensionedScalar dryingRate[celli]=scalar(6)*massTransCoeff[celli]*(Ymoist[celli]*rhos[celli]-YH2O[celli]*rho)/F; ^ createFields.H:1049:40: warning: suggest parentheses around assignment used as truth value [-Wparentheses] else if(ts[celli]=(hunderdCel.value())) ^ createFields.H:1052:174: error: variable-sized object ‘dryingRate’ may not be initialized dimensionedScalar dryingRate[celli]=scalar(6)*(convectiveHeatTransCoeff[celli] *(tg[celli] -ts[celli] )+scalar(0.9)*stephBoltz*(pow(298.15,4)-pow(ts[celli] ,4)))/(F*VapHeat); ^ createFields.H:1052:20: warning: unused variable ‘dryingRate’ [-Wunused-variable] dimensionedScalar dryingRate[celli]=scalar(6)*(convectiveHeatTransCoeff[celli] *(tg[celli] -ts[celli] )+scalar(0.9)*stephBoltz*(pow(298.15,4)-pow(ts[celli] ,4)))/(F*VapHeat); ^ Thanks in advance. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[openSmoke] libOpenSMOKE | Tobi | OpenFOAM Community Contributions | 562 | January 25, 2023 09:21 |
field function for reaction rate | Mr.Hack | STAR-CCM+ | 3 | June 3, 2016 03:29 |
Mass Flow Rate Custom Field Function | AJoubert | FLUENT | 2 | March 23, 2013 08:50 |
write forward, reverse reaction coefficient, reaction rate in ChemFoam | hismother | OpenFOAM Running, Solving & CFD | 3 | November 7, 2012 03:33 |
surface reaction rate plot at diffusiion limit cas | Jason | FLUENT | 1 | August 22, 2003 04:54 |