|
[Sponsors] |
August 4, 2010, 15:00 |
absolute value of strain rate
|
#1 |
New Member
Muhammad reza hassani
Join Date: Apr 2010
Posts: 29
Rep Power: 15 |
hi
I am creating a user defined viscosity model in OF1.7; The problem is that I have to use absolute value of the strainRate as an argument for the "sqrt" command. when I use abs for this purpose, an error occurs: Making dependency list for source file viscosityModels/ExtendedCasson/ExtendedCasson.C SOURCE=viscosityModels/ExtendedCasson/ExtendedCasson.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I.. -I/opt/openfoam170/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam170/src/OpenFOAM/lnInclude -I/opt/openfoam170/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/ExtendedCasson.o viscosityModels/ExtendedCasson/ExtendedCasson.C: In member function ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::viscosityModels::ExtendedCasson::calcNu() const’: viscosityModels/ExtendedCasson/ExtendedCasson.C:54: error: no matching function for call to ‘abs(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >)’ /usr/include/stdlib.h:766: note: candidates are: int abs(int) /usr/include/c++/4.4/cmath:102: note: long double std::abs(long double) /usr/include/c++/4.4/cmath:98: note: float std::abs(float) /usr/include/c++/4.4/cmath:94: note: double std::abs(double) /usr/include/c++/4.4/cstdlib:170: note: long long int __gnu_cxx::abs(long long int) /usr/include/c++/4.4/cstdlib:139: note: long int std::abs(long int) viscosityModels/ExtendedCasson/ExtendedCasson.C:54: error: no matching function for call to ‘abs(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >)’ /usr/include/stdlib.h:766: note: candidates are: int abs(int) /usr/include/c++/4.4/cmath:102: note: long double std::abs(long double) /usr/include/c++/4.4/cmath:98: note: float std::abs(float) /usr/include/c++/4.4/cmath:94: note: double std::abs(double) /usr/include/c++/4.4/cstdlib:170: note: long long int __gnu_cxx::abs(long long int) /usr/include/c++/4.4/cstdlib:139: note: long int std::abs(long int) make: *** [Make/linuxGccDPOpt/ExtendedCasson.o] Error 1 ****** shall I include any library in the .C file of my viscosity model? |
|
August 4, 2010, 15:09 |
|
#2 |
New Member
Muhammad reza hassani
Join Date: Apr 2010
Posts: 29
Rep Power: 15 |
it seems that there is mag() in OF instead of abs(). problem solved
thanks |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
strain rate in UDF | Paulina | FLUENT | 11 | November 20, 2014 03:06 |
strain rate magnitude | ahmadbakri | STAR-CCM+ | 1 | June 3, 2010 13:03 |
About "Shear strain rate" | leo1985 | CFX | 0 | April 26, 2008 04:48 |
Strain rate. | MM? | Main CFD Forum | 1 | February 15, 2006 08:55 |
strain rate at arbitrary position in a cell | K. Kevala | FLUENT | 0 | February 4, 2004 17:14 |