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

Laplacian operator and nuSgs for heat equation

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   June 25, 2009, 09:03
Default Laplacian operator and nuSgs for heat equation
  #1
New Member
 
Quentin
Join Date: May 2009
Posts: 22
Rep Power: 17
Bedotto is on a distinguished road
Hello Foamers,

I've a problem with the laplacian operator in openFoam. Indeed in my solver I've written successfully in my file.C the following heat equation:

(
fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(DT, T)
)
However I would like to add the term corresponding to the subsgrid scale model, I mean the term Nu_t/Pr_t. Where Nu_t is the turbulent viscosity and Pr_t the turbulent prandtl. The equation I have to write under openFoam is now: dT/dt + d(T*Ui)/dxi = d [( Nu/Pr +Nu_t/Pr_t) * dT/dxi ]/dxi
where Nu_t is not a constant of course. I call Nu_t with the sentence sgsModel->nuSgs(). (Thanks again Santos!)
I've tried to write the new equation like:
(
fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(DT,T)
- (fvm::laplacian(sgsModel->nuSgs(),T)) *(1/0.6)
-( fvc::grad(T) & fvc::grad(sgsModel->nuSgs()) ) *1/0.6
);
where Pr_t=0.6.
The problem is I get an error when I try to compile. The error comes from this line:
- (fvm::laplacian(sgsModel->nuSgs(),T)) *(1/0.6)
Indeed it says:

Nueff.C: In function âint main(int, char**)â:
Nueff.C:133: error: no match for âoperator*â in âFoam::fvm::laplacian(const Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >&, Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = double](((Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&)(& T))) * 1.66666666666666674068153497501043602824211120605e +0â
/home/bedotto/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude/dimensionedTensor.H:77:

I've tried to write this line in other ways
(for instance:
fvm::laplacian(sgsModel->nuSgs()) *(1/0.6)*T + fvm::laplacian(T)*(1/0.6)*sgsModel->nuSgs(), but it doesn't work)
I think I don't use correctly this operator, maybe someone could tell me more about how does work this operator, or is there something in the programmer's guide I've missed?

My regards

Quentin


Last edited by Bedotto; June 25, 2009 at 09:55.
Bedotto is offline   Reply With Quote

 


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



All times are GMT -4. The time now is 18:05.