CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Coodles (https://www.cfd-online.com/Forums/openfoam-pre-processing/62153-coodles.html)

anja January 6, 2006 06:17

Hi, does someone know, wher
 
Hi,

does someone know, where I can get basic information on the coodles solver, as there no links in the UserGuide?

Thanks a lot,
Anja

eugene January 6, 2006 06:22

Your best bet would be inspect
 
Your best bet would be inspecting the source code. What kind of information were you looking for?

anja January 6, 2006 06:53

I don't know how to set the in
 
I don't know how to set the initial variables, e.g. muSgs and muTilda.
Furthermore I get error messages concerning the laplacian schemes.

eugene January 6, 2006 07:01

I take it you are using the co
 
I take it you are using the coodles tutorial case as a template?

muSgs and muTilda are just nuSgs and nuTilda multiplied by the density.

Use the fvSchemes and fvSolution dictionaries from the coodles tutorial case. If you still have problems, please post the error messages here.

anja January 6, 2006 07:13

Yes, I do use the tutorial as
 
Yes, I do use the tutorial as a template.

Error for example:
Non-optional dictionary entry 'laplacian(nu,U)' not found in dictionary .../system/fvSchemes::laplacianSchemes in file .../system/fvSchemes::laplacianSchemes

hjasak January 6, 2006 07:28

Works out of box for me. The
 
Works out of box for me. The laplacian schemes section is as follows:

laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear corrected;
laplacian((rho*1|A(U)),p) Gauss linear corrected;
laplacian(alphaEff,h) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DBEff,B) Gauss linear corrected;
laplacian(DmuTildaEff,muTilda) Gauss linear corrected;
}

Incodentally, when you hit messages like this, feel free to edit the offending dictionary to get it to work. In your case, I would add something like:

laplacian(nu,U) Gauss linear corrected;

into the appropriate secton and try again. Hope you can follow my idea.

Hrv

eugene January 6, 2006 07:44

Yeah, but if you are running c
 
Yeah, but if you are running coodles, there should be no need to define laplacian(nu,U).
More info please.

anja January 6, 2006 07:45

I also had to add: laplacian(
 
I also had to add:
laplacian(1|A(U),p)Gauss linear corrected;

But now it's saying:
Invalid boundary type name 'pressureTransmissiveOutlet'

anja January 6, 2006 07:57

Okay, I'm so so sorry. I made
 
Okay, I'm so so sorry. I made a mistake in the ControlDict, which was not a problem with coodles at all.

But here is the next one, I try to postprocess my results with paraFoam and then:
FOAM FATAL IO ERROR:wrong token type - expected scalar found on line 36 the word 'nan'

What does that mean?

anja January 6, 2006 08:25

There might be a problem with
 
There might be a problem with the 'Courant number'.

The tutorial for the lid-driven cavity flow says, that to achieve temporal accuracy and numerical stability when running icoFoam, a Courant number of less than 1 is required.

But which number is required for using coodles?

eugene January 6, 2006 09:32

nan means "not-a-number". This
 
nan means "not-a-number". This means youre calculation has blown up and written some nonsence to file.

Max courant number for standard coodles should also remain below 1. Preferrably below 0.7-8'ish.

anja January 10, 2006 07:06

I tried to set Co=0.75, but al
 
I tried to set Co=0.75, but all I get during the calculation is:
Mean and max Courant Numbers = nan nan
time step continuity errors : sum local = nan, global = nan, cumulative = nan
time step continuity errors : sum local = nan, global = nan, cumulative = nan
bounding k, min: 0 max: 0 average: 0

Does someone have any suggestion why this happens?

Thanks a lot for the help,
Anja

anja January 10, 2006 07:27

Or can someone please explain
 
Or can someone please explain me, what B for the initial variables of the coodles means?

Thanks again,
Anja

fabianpk January 10, 2006 08:05

It is the term form filtering
 
It is the term form filtering the Navier stokes equations, you can take a look at the H file of the LES model you are using to see its exact definition. For example /OpenFOAM/OpenFOAM-1.2/src/LESmodels/compressible/oneEqEddy/oneEqEddy.H

B = 2/3*k*I - 2*nuEff*dev(D)

/Fabian

eugene January 10, 2006 09:57

B is only needed as initial co
 
B is only needed as initial condition when you are using a Reynolds stress SGS model. It represents the SGS stresses.

On the rest, keep making your timestep smaller. If that doesnt eventually work, you have problems with your boundary conditions.

melanie March 9, 2006 13:26

Hi, I want to run a coodle
 
Hi,

I want to run a coodle calculation from a simpleFoam result, as an initial guess of the flow. I copied the case and made the adequate corrections in the system files, but there is still something wrong as I get the error message:

--> FOAM FATAL ERROR : dimensions of phi are not correct

From function CrankNicholsonDdtScheme<type>::fvcDdtPhiCorr
in file finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholson

I suppose that the trouble comes from the compressibility, but I don't find where to set the dimension of phi.
Could someone give me a hint ? Thanks !
mélanie

gschaider March 9, 2006 15:18

If you open the file with the
 
If you open the file with the phi-data, just below the header before the line internalField you'll find a line "dimensions" with 7 numbers (Which number corresponds to which SI-unit is documented in the Programmer's Manual).

BUT: most solvers (don't know about coodle, never worked with that) calculate phi from U and rho if they don't find it in the initial time-step. So you might as well remove phi from the ICs and start the simulation.

grtabor March 9, 2006 15:20

phi will be one of the fields
 
phi will be one of the fields in the timestep directory that you are starting from; the dimensions are contained in the header. Alternatively just delete the file; coodles should recalculate it during startup if it can't find it.

Gavin

melanie March 10, 2006 03:26

Thanks for your answers; I loo
 
Thanks for your answers; I looked in the time directory and did not find the phi file, but I forgot to mention what's in the log-file:

Create mesh for time = 0

Reading thermophysical properties
Selecting thermodynamics package hThermo<pureMixture<constTransport<specieThermo<hC onstThermo<perfect
Gas>>>>>

Reading field U
Reading/calculating face flux field phi

Creating turbulence model
--> FOAM Warning :
From function cubeRootVolDelta::calcDelta()
in file cubeRootVolDelta/cubeRootVolDelta.C at line 54
Case is 2D, LES is not strictly applicable

Creating field DpDt

Starting time loop
Time = 5e-07

Mean and max Courant Numbers = nan nan

As the same case is running well with oodles (exactly the same except the application and thermophysical properties), I think it does not come from LES.
Thanks !
mélanie

grtabor March 10, 2006 04:24

Looks like you must have chang
 
Looks like you must have changed _something_ as the code is now starting up, albiet with a problem with the Courant number. Why are you trying to run an LES case in 2d?

The courant numbers are evaluated in
src/cfdTools/compressible/CourantNo.H - have a look there to figure out why you are generating NaN's. Looking at what is there, my guess is that there is something wrong with your rho field; since

surfaceScalarField SfUfbyDelta =
mesh.surfaceInterpolation::deltaCoeffs()*mag(phi)/fvc::interpolate(rho);

and this is on the bottom it could be screwing things up.

Gavin

melanie March 10, 2006 04:36

thanks Gavin, indeed my rho fi
 
thanks Gavin, indeed my rho field is not intialized anywhere and I guess it takes 0.
I looked into the coodles tutorial, and there is either no rho file in the constant/0 directory, rho is just created at the first time step.
Should I create a rho file with a standard value ?
mélanie

gschaider March 10, 2006 04:38

@melanies nan-Courant's: That'
 
@melanies nan-Courant's: That's just a guess: I think I had similar problems with other solvers where adjustTimeStep was yes and maxDeltaT was 0 (which of course doesn't make too much sense, but there are cases floating around where it's set that way).

melanie March 10, 2006 04:47

I think I have found something
 
I think I have found something: in incompressible solvers (my initial condition is incompressible), p is calculated from p/rho with reference 0 Pa in my case. It means that my initial pressure field is not absolute, but relative to p_ref. I changed the value of p_ref to 101300 Pa, but no change, I get the same error.
mélanie

grtabor March 10, 2006 04:59

>thanks Gavin, indeed my rho f
 
>thanks Gavin, indeed my rho field is not intialized anywhere and I guess it takes 0.
>I looked into the coodles tutorial, and there is either no rho file in the constant/0 directory, rho is just created at the first time step.
>Should I create a rho file with a standard value ?
>mélanie

I'd try that as a first guess, although its been a while since I last ran coodles (8 years?)

Gavin

eugene March 10, 2006 05:16

Things you should do before ru
 
Things you should do before running coodles:
1. Change the p dimensions from [0 2 -2 0 0 0 0] to [1 -1 -2 0 0 0 0].
2. Change the new p to absolute values
3. Delete phi and phi_0
4. Coodles uses the thermo package to calculate rho. So you need the right entries in your thermophysicalProperties dictionary.
5. Make the outlet pressure boundary non-reflecting (otherwise you will get waves bouncing up and down your domain).
6. Change nuSgs to muSgs. Also modify the units.
7. Use the fvScemes, fvSolotion and controlDict from the coodles tutorial.

Thats all I can think of for now, but there is probably some things I have missed.

melanie March 10, 2006 05:37

Eugene, that's what I did:
 
Eugene, that's what I did:

1. already done,
2. I changed with no more results,
3. actually there was no phi* file,
4. basic flow, identical to coodles tutorial,
5. what is the name of this pressure non-reflective BC? and what are the conditions on the fields ?
6. already done,
7. already done.

Bernhard: my timestep is fixed, no such problems.

eugene March 10, 2006 05:54

"pressureTransmissive" is the
 
"pressureTransmissive" is the BC name.
I think it takes a Linf (wave length scale - don't ask), Pinf (target pressure) and a value entry.

Checking your error post again, my best guess is that either your temperature or pressure field is broken. For "nan" to come up before you have even started solving means you probably have either p=0 or T=0 somewhere in your initial fields. If you stick either of these into the thermo package it will give you bollocks. You need physically realistic values for temperature and pressure for coodles to work.

Add the following lines to your code before the Ueqn.H entry:

Info<< "rho max/min : " << gMax(rho) << " " << gMin(rho) << endl;
Info<< "p max/min : " << gMax(p) << " " << gMin(p) << endl;

Should give you an idea of what is going wrong.

melanie March 10, 2006 07:25

Thanks Eugene. Firstly I foun
 
Thanks Eugene.
Firstly I foun errors in my initial temperature field; then I modified the source file like you sais to check max/min rho and p (OK), and I still got the same error message just before solving p (here follows the end of the log-file):

Starting time loop

Time = 1e-06

Mean and max Courant Numbers = 0.005518647 0.18159526
BICCG: Solving for Ux, Initial residual = 9.2946507e-05, Final residual = 4.9573551e-08, No Iterations 1
BICCG: Solving for Uy, Initial residual = 0.00016879922, Final residual = 7.0933073e-11, No Iterations 2
BICCG: Solving for h, Initial residual = 1, Final residual = 2.1862895e-10, No Iterations 3
rho max/min: 1.1827567 1.163765
p max/min: 102083.49 100442.93

Something may be wrong in the pressure field, but how to know where ?

pierre March 10, 2006 09:34

How about initialising with rh
 
How about initialising with rhoSimpleFoam?

Pierre

melanie March 10, 2006 10:16

I just wanted to start from th
 
I just wanted to start from the same initial conditions, it is possible with Fluent to turn on the compressibility on the fly, why not with OpenFOAM ?
If I don't find the mistake, I know that this will be the thing to do...
mélanie

mirsaeedi December 10, 2006 10:59

Hi I solved a turbulent pipe
 
Hi
I solved a turbulent pipe flow with LES but results do not match with experimental datas!
can anyone help me?

mirsaeedi December 10, 2006 11:02

Hi I solved a turbulent pipe
 
Hi
I solved a turbulent pipe flow with LES but results do not match with experimental datas!
can anyone help me?

mahaputra June 4, 2009 01:19

Dear Melanie


did you success to run your modified simpleFoam case on LES solver?

please let me know, since im facing similar problem.


could anybody kindly post here, how to solve the problem ?

i followed the tips from eugene , i tried to run 2d case on coodles, but its courant number becomes exploded in time 6 :


Time = 6

Courant Number mean: 17306 max: 1.00279e+07
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Ux, Initial residual = 0.918686, Final residual = 4.97796, No Iterations 1001
DILUPBiCG: Solving for Uy, Initial residual = 0.833987, Final residual = 17.7067, No Iterations 1001
DILUPBiCG: Solving for h, Initial residual = 0.998159, Final residual = 0.267814, No Iterations 1001


Maximum number of iterations exceeded#0 Foam::error::printStack(Foam::Ostream&) in "/home/user/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/user/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Foam::hThermo<Foam::pureMixture<Foam::constTranspo rt<Foam::specieThermo<Foam::hConstThermo<Foam::per fectGas> > > > >::calculate() in "/home/user/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libbasicThermophysicalModels.so"
#3 Foam::hThermo<Foam::pureMixture<Foam::constTranspo rt<Foam::specieThermo<Foam::hConstThermo<Foam::per fectGas> > > > >::correct() in "/home/user/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libbasicThermophysicalModels.so"
#4 main in "/home/user/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/coodles"
#5 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#6 Foam::regIOobject::readIfModified() in "/home/user/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/coodles"


From function specieThermo<thermo>::T(scalar f, scalar T0, scalar (specieThermo<thermo>::*F)(const scalar) const, scalar (specieThermo<thermo>::*dFdT)(const scalar) const) const
in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.5/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 78.

FOAM aborting

klilla January 14, 2010 09:05

problem with acoustic benchmark
 
Dear All,

I tried to simulate an acoustic pulse placed in the middle of a rectangular domain. The pulse should spread with the speed of sound unidirectionally. This happens well, BUT, in the density field there remains a smaller pulse constantly. This I do not understand, it seams that there and entropy pulse created, due to I do not know what.

My initial problem:

velocity is zero everywhere
gaussian pulse of pressure at the center of the domain (set by funkySet Field)
Op. 1: constant temperature, hoping that the "thermo" package will set the density well
Op. 2: set the density too as a gauss pressure rho = 1/(c*c)*p

Both initializations give back exactly the same results.

I normalized the pressure by pNorm = p/(c*c) +0.327 where the correction is exactly the same as the amplitude of the remaining pulse. In this case the density and normP plots are the same (except that in the density there is the extra bump )

have you any idea where I introduce this additional pulse?

Thanks,

Lilla


All times are GMT -4. The time now is 15:43.