CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   rhoPisoFoam with radiation (http://www.cfd-online.com/Forums/openfoam-programming-development/69434-rhopisofoam-radiation.html)

braennstroem October 22, 2009 14:34

rhoPisoFoam with radiation
 
Hi,

I am struggling a bit with the implementation of a radiation source for rhoPisoFoam.

Basically, I added:
#include "radiationModel.H"

adjusted the options file with:
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \

-lradiation \

and added a radition source to the enthalpy eqn:

solve
(
fvm::ddt(rho, h)
+ fvm::div(phi, h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
DpDt
+ radiation->Sh(thermo)
);

thermo.correct();
radiation->correct();


Unfortunately, I get this error, which I do not understand:

In file included from rhoPisoFoam.C:74:
hEqn.H: In function ‘int main(int, char**)’:
hEqn.H:9: error: expected primary-expression before ‘->’ token
hEqn.H:13: error: expected primary-expression before ‘->’ token

Has anyone an idea, what this means?

Thanks!
Fabian

gschaider October 23, 2009 04:49

Quote:

Originally Posted by braennstroem (Post 233727)
Unfortunately, I get this error, which I do not understand:

In file included from rhoPisoFoam.C:74:
hEqn.H: In function ‘int main(int, char**)’:
hEqn.H:9: error: expected primary-expression before ‘->’ token
hEqn.H:13: error: expected primary-expression before ‘->’ token

Has anyone an idea, what this means?

Hi Fabian. You probably figured out by now, but I'll tell it anyway.

Basically it means "I don't know this radiation object you are talking about". Have you created it? Have a look at the last lines of createFields.H of the buoyantRadiationFoam-solver for an example

Bernhard

braennstroem October 23, 2009 05:18

Hallo Bernhard,

thanks for the explanation! Though it seems, that is not needed anymore in 1.6.x or maybe the object gets created in another way than in 1.5,where it is done with:

Info<< "Creating radiation model\n" << endl;
autoPtr<radiation::radiationModel> radiation
(
radiation::radiationModel::New(T)
);

Would be nice, if you have another suggestion.

Fabian

gschaider October 23, 2009 06:23

Quote:

Originally Posted by braennstroem (Post 233774)
Hallo Bernhard,

thanks for the explanation! Though it seems, that is not needed anymore in 1.6.x or maybe the object gets created in another way than in 1.5,where it is done with:

Info<< "Creating radiation model\n" << endl;
autoPtr<radiation::radiationModel> radiation
(
radiation::radiationModel::New(T)
);

Would be nice, if you have another suggestion.

I have. If you look at the C-file of that solver in 1.6 you'll see the line

#include "createRadiationModel.H"

which does exactly the same thing

Bernhard

braennstroem October 23, 2009 11:01

Hi Bernhard,

thanks did not see this ... was always looking for radiation not Radiation :-(

Fabian


All times are GMT -4. The time now is 17:46.