|
[Sponsors] |
Laplacian operator and nuSgs for heat equation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 25, 2009, 09:03 |
Laplacian operator and nuSgs for heat equation
|
#1 |
New Member
Quentin
Join Date: May 2009
Posts: 22
Rep Power: 17 |
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. |
|
|
|