|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Nilesh
Join Date: Sep 2012
Posts: 7
Rep Power: 15 ![]() |
I am trying to define a variable in a following class.
Foam::tmp<Foam::volScalarField> Foam::viscosityModels::EllisLaw::calcNu() const { dimensionedScalar current_time(U_.time()); //.value()); const volScalarField& old_visc = U_.mesh().lookupObject<volScalarField>("visco_old" ); } I want a variable AB which is "old_visc*strain_rate()". I tried all the definitions for AB. (double, volScalarField etc) but in all cases it gives compilation error for the definition. The C++ file and the error message image is attached with the thread. Please respond if any one has some comments on it. Thanks and regards, Nilesh |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 23 ![]() |
Please put ALL (or at least the first few) the error messages in your post. It is a bit difficult to read from the screenshot. Also, what is the return type of the function strainRate()? Is it volSymmTensorField? I would assume the type of a volScalarField*volSymmTensorField to be again volSymmTensorField?
|
|
|
|
|
|
|
|
|
#3 |
|
New Member
Nilesh
Join Date: Sep 2012
Posts: 7
Rep Power: 15 ![]() |
Thanks Bernhard for such a quich response.
The function strain_rate() returns "mag(fvc::grad(U_))". I am attaching the full output of the command "wmake libso" in the error.txt file. Please let me know if you need any further information. Thnaks and regards, -- Nilesh |
|
|
|
|
|
|
|
|
#4 |
|
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 23 ![]() |
You're calling the function strain_rate(), but in the code it is called strainRate(), where is strainRate() defined exactly, and how? Also, I see an error message in line 89 of EllisLaw.C, but that line appears to be commented. And, why did you define AB and BC as const?
|
|
|
|
|
|
![]() |
| Tags |
| definition of a variable, volscalarfield |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 13:21 |
| emag beta feature: charge density | charlotte | CFX | 4 | March 22, 2011 10:14 |
| error in COMSOL:'ERROR:6164 Duplicate Variable' | bhushas | COMSOL | 1 | May 30, 2008 05:35 |
| Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug | unoder | OpenFOAM Installation | 11 | January 30, 2008 21:30 |
| Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 21:09 |