CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Forces in OF15 (https://www.cfd-online.com/Forums/openfoam-solving/57829-forces-of15.html)

paka September 23, 2010 06:20

Problem solved: http://www.cfd-online.com/Forums/ope...-v1-6-a-3.html

meddd October 3, 2010 18:15

keyword nu is undefined in dictionary...
 
hi!!!!!
i have problem, after icoFoam:
--> FOAM FATAL IO ERROR:
keyword nu is undefined in dictionary "/home/medet/OpenFOAM/medet-1.7.1/run/tutorials/multiphase/interFoam/laminar/damBreak/constant/transportProperties"

file: /home/medet/OpenFOAM/medet-1.7.1/run/tutorials/multiphase/interFoam/laminar/damBreak/constant/transportProperties from line 20 to line 62.

From function dictionary::lookupEntry(const word&, bool, bool) const
in file db/dictionary/dictionary.C at line 395.

FOAM exiting
//////////////////////////////////////////////////////////////////////////////////////
transportProperties :
phase1
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
rho rho [ 1 -3 0 0 0 0 0 ] 1000;
CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
m m [ 0 0 1 0 0 0 0 ] 1;
n n [ 0 0 0 0 0 0 0 ] 0;
}

BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 99.6;
n n [ 0 0 0 0 0 0 0 ] 0.1003;
}
}

phase2
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
rho rho [ 1 -3 0 0 0 0 0 ] 1;
CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
m m [ 0 0 1 0 0 0 0 ] 1;
n n [ 0 0 0 0 0 0 0 ] 0;
}

BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 99.6;
n n [ 0 0 0 0 0 0 0 ] 0.1003;
}
}

sigma sigma [ 1 0 -1 0 0 0 0 ] 0.07;
////////////////////////////////////////////////////////////////////////////////////////


Please help!!!

desert_1250 January 14, 2011 17:10

drag coeff
 
Hi oll of foamers
I hope that you are well.
I have one question:
I want to calculate dragCoefficient over a cylinder with 0.025 diameter with viscoelasticFluidFoam solver. ( I use Kubuntu, OF 1-5 decv) . I add the code below in controlDict file
application viscoelasticFluidFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 300;
deltaT 1e-5;
writeControl adjustableRunTime;
writeInterval 1;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
graphFormat raw;
runTimeModifiable yes;
adjustTimeStep on;
maxCo 0.8;
maxDeltaT 0.001;
functions
(
forces
{
type forces;
functionObjectLibs ("libforces.so"); //Lib to load
outputControl runTime;
outputInterval 1;
patches (cylinder); // change to your patch name
PName p;
Uname U;
rhoInf 803.87097; //Reference density for fluid
CofR (0 0 0); //Origin for moment calculations
}
forceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
outputControl runTime;
outputInterval 1;
patches (cylinder); //change to your patch name
PName p;
Uname U;
log true;
rhoInf 803.87097;
CofR (0 0 0);
liftDir (0 1 0);
dragDir (1 0 0);
pitchAxis (0 0 0);
magUInf 0.036;
lRef 0.025;
Aref 0.025;
}
);
// ************************************************** *********************** //
, but when run it,after one step, this error appear :
Courant Number mean: 3.24445e-07 max: 5.10534e-06 velocity magnitude: 0.000421808
deltaT = 1.43997e-05
No valid model for viscous stress calculation.
From function forces::devRhoReff()
in file forces/forces.C at line 306.
FOAM exiting
*** glibc detected *** viscoelasticFluidFoam: double free or corruption (fasttop): 0x0902a378 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(+0x6b591)[0x52c591]
/lib/tls/i686/cmov/libc.so.6(+0x6cde8)[0x52dde8]
/lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0x530ecd]
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0x7b3741]
/usr/lib/libstdc++.so.6(_ZNSs4_Rep10_M_destroyERKSaIcE+0x1d )[0x78fc2d]
/usr/lib/libstdc++.so.6(_ZNSsD2Ev+0x4c)[0x79163c]
/usr/lib/OpenFOAM-1.5-dev/lib/libfiniteVolume.so(_ZN4Foam4wordD1Ev+0x1d)[0xcf2efd]
/lib/tls/i686/cmov/libc.so.6(+0x2f1bf)[0x4f01bf]
/lib/tls/i686/cmov/libc.so.6(+0x2f22f)[0x4f022f]
/usr/lib/OpenFOAM-1.5-dev/lib/libOpenFOAM.so(_ZN4Foam5error4exitEi+0x1f9)[0x3f5d2f9]
/usr/lib/OpenFOAM-1.5-dev/lib/libforces.so(_ZNK4Foam6forces10devRhoReffEv+0xf54)[0x65315f4]
/usr/lib/OpenFOAM-1.5-dev/lib/libforces.so(_ZNK4Foam6forces10calcForcesEv+0x32)[0x652c852]
.
.
.
======= Memory map: ========
00110000-0024a000 r-xp 00000000 00:10 16478 /usr/lib/OpenFOAM-1.5-dev/lib/libviscoelasticTransportModels.so
0024a000-0024b000 ---p 0013a000 00:10 16478 /usr/lib/OpenFOAM-1.5-dev/lib/libviscoelasticTransportModels.so
0024b000-0024d000 r--p 0013a000 00:10 16478 /usr/lib/OpenFOAM-1.5-dev/lib/libviscoelasticTransportModels.so
0024d000-0024e000 rw-p 0013c000 00:10 16478 /usr/lib/OpenFOAM-1.5-dev/lib/libviscoelasticTransportModels.so
0024e000-00410000 r-xp 00000000 00:10 16479 /usr/lib/OpenFOAM-1.5-dev/lib/libmeshTools.so
00410000-00413000 r--p 001c1000 00:10 16479 /usr/lib/OpenFOAM-1.5-dev/lib/libmeshTools.so
00413000-00415000 rw-p 001c4000 00:10 16479 /usr/lib/OpenFOAM-1.5-dev/lib/libmeshTools.so
00415000-00416000 rw-p 00000000 00:00 0
.
.
.
1) can u guide me What is the problem?
2) did I enter Aref number truly? how Lref ? ( my diameter cylinder is 0.025 & 2D)
3) If needed to complile forceCoeffs, can you tell me how complie it successfully?
Thank a lot, Rasoul

paka January 14, 2011 17:41

I'm not 100% sure, but I think OF1.5 did not allow you to calculate forces through this library. My advise, update to OF1.7.
K

desert_1250 January 15, 2011 10:39

thanks paka for your reply,
i try to do my case with OF 1.7 and tell what happen

do every one know a bout this error that appear in the error massege?

"
No valid model for viscous stress calculation "




Rasoul
best regards

paka January 15, 2011 14:41

Forget about this error. Get the new version and start again.

Focusing on this error is like driving a car from 2010, but trying to fix it based on what people drove in 1936.

What it seems for me, I would advise a bit of reading about programming structures and C++.

Best!

desert_1250 September 17, 2011 03:24

1 Attachment(s)
dear foamers, i wanna to calculate the forces formulated that was present in the attachment over a cylinder. my solver is viscoelasticFluidFoam and the forces calculation be deferent with newtonians' one, so when i wanna use forces function in OpenFOAM, this error apears :
"No valid model for viscous stress calculation "

can every one help me how do it? tnx




viraj20feb June 18, 2016 06:04

Quote:

Originally Posted by mgz1985 (Post 193787)
hi Ivan

i am able to get the coefficients but they are very weird values

when I use Aref=1, I get Cd=7e-05 and Cl=1.38e-04

so i tried it by reducing Aref to 0.00001 (i know it is wrong) i get the order correct for Cd but Cl is still one order low.

can anyone tell me where could be the possible error?

thanx

Hello friend,

Did you get the correct values of force co-efficients? I am also getting absurd values in the range of 10^5. I don't know what mistake I am doing

alimea November 14, 2017 11:51

Quote:

Originally Posted by desert_1250 (Post 324487)
dear foamers, i wanna to calculate the forces formulated that was present in the attachment over a cylinder. my solver is viscoelasticFluidFoam and the forces calculation be deferent with newtonians' one, so when i wanna use forces function in OpenFOAM, this error apears :
"No valid model for viscous stress calculation "

can every one help me how do it? tnx




Hi
I have this error too!
Did you find how to solve this problem?
Thanks

mortezanayebi July 8, 2018 02:49

error : no valid model for viscous stress calculation
 
Quote:

Originally Posted by alimea (Post 671578)
Hi
I have this error too!
Did you find how to solve this problem?
Thanks

hello
I have this error ( no valid model for viscous stress calculation) too!
Did you find how to solve this problem?
Thanks

blaise July 8, 2018 08:47

Did you set a suitable RASmodel in constant/RASProperties (or in turbulenceProperties in newer OF versions)?

Cheers,

Pascal.
--

alimea July 8, 2018 08:55

Quote:

Originally Posted by mortezanayebi (Post 698509)
hello
I have this error ( no valid model for viscous stress calculation) too!
Did you find how to solve this problem?
Thanks

Dear Morteza

I had had this problem some month ago!! So I have forgotton that. Please explain more about what you want to do. Maybe I can help you.

mortezanayebi July 9, 2018 08:35

Further explanation
 
2 Attachment(s)
Quote:

Originally Posted by alimea (Post 698528)
Dear Morteza

I had had this problem some month ago!! So I have forgotton that. Please explain more about what you want to do. Maybe I can help you.

To calculate the forces and the their coefficients, I added a function to the end of controlDict file of the problem. After applying the solver (viscoelasticFluidFoam), this error poped up; "No valid model for viscous stress calculation in force.c file"

You are kindly asked to find the "error" and the "function added to controlDict" in the attachement.

Thank you very much for your help!

Kind Regards!

alimea July 9, 2018 08:41

Quote:

Originally Posted by mortezanayebi (Post 698626)
To calculate the forces and the their coefficients, I added a function to the end of controlDict file of the problem. After applying the solver (viscoelasticFluidFoam), this error poped up; "No valid model for viscous stress calculation in force.c file"

You are kindly asked to find the "error" and the "function added to controlDict" in the attachement.

Thank you very much for your help!

Kind Regards!


Dear Morteza

Unfortunately forces function isn't written for viscoelasticFluidFoam! You should write it yourself and add it to forces code.
I have done that a couple of months ago. it needs to learn C++ and openFoam language.

Regards,
Ali

mortezanayebi July 9, 2018 08:55

Quote:

Originally Posted by blaise (Post 698527)
Did you set a suitable RASmodel in constant/RASProperties (or in turbulenceProperties in newer OF versions)?

Cheers,

Pascal.
--

I don't understand what an RASmodel is. Would you please explain it further?

alimea July 9, 2018 09:07

Quote:

Originally Posted by mortezanayebi (Post 698630)
I don't understand what an RASmodel is. Would you please explain it further?

What is the relation between RASmodel and your last question (forces in viscoelasticFluidFoam)?!

RASmodel is related to turbulent flow and the model that you want to use. viscoelasticFluidFoam is written based on laminar flow.

mortezanayebi July 9, 2018 09:09

Quote:

Originally Posted by alimea (Post 698628)
Dear Morteza

Unfortunately forces function isn't written for viscoelasticFluidFoam! You should write it yourself and add it to forces code.
I have done that a couple of months ago. it needs to learn C++ and openFoam language.

Regards,
Ali

thank you very much for your help

mortezanayebi July 9, 2018 09:17

Quote:

Originally Posted by alimea (Post 698634)
What is the relation between RASmodel and your last question (forces in viscoelasticFluidFoam)?!

RASmodel is related to turbulent flow and the model that you want to use. viscoelasticFluidFoam is written based on laminar flow.

thanks. I didn't know that.

alimea July 9, 2018 09:19

Quote:

Originally Posted by mortezanayebi (Post 698637)
thanks. I didn't know that.

No problem ;)

-----
Ali

blaise July 9, 2018 09:36

Sorry for the confusion I caused... it was just a shot in the dark, as I thought I remembered seeing the same error when I registered forces via a function object and had the line

Code:

simulationType  laminar;
accidentally in constant/RASProperties (or constant/turbulenceProperties in other OF versions)...

But anyway, apparently the error comes from missing implementation of forces function...

Best regards,

Pascal.
--

mortezanayebi July 9, 2018 10:54

Quote:

Originally Posted by blaise (Post 698642)
Sorry for the confusion I caused... it was just a shot in the dark, as I thought I remembered seeing the same error when I registered forces via a function object and had the line

Code:

simulationType  laminar;
accidentally in constant/RASProperties (or constant/turbulenceProperties in other OF versions)...

But anyway, apparently the error comes from missing implementation of forces function...

Best regards,

Pascal.
--



thank you very much for your help


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