CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Dimensions ! (http://www.cfd-online.com/Forums/openfoam-solving/80358-dimensions.html)

T.D. September 23, 2010 06:45

Dimensions !
 
Hi everybody,

Please Please, i need to stop all these "dimensions stuff", they are turning me crazy!!!
because my equation is so complicated, and i need to solve it without any dimensions even for the Ueqn and P and correction i mean for all
I mean even for icoFoam forexample, so How to switch OFF all dimensions
in my application solver, and not in the all root openfoam directories.

Thanks a lot

T.D.

marupio September 23, 2010 16:10

Do you have access to OpenFOAM-1.x.x/etc/controlDict? If so, find the dimensionSet entry in DebugSwitches and set it to 0.

Better yet, are you writing your own solver? If so, start with:
Code:

dimensionSet::debug = 0;
Hopefully that works.

alberto September 24, 2010 02:18

In my experience, turning off the dimensional check is not smart. It often saves you from making obvious mistakes and finds almost all typos in complicated equations.

You are coding something complex: it is exactly when you need automatic checks like these :-)

Of course, just my two cents ;-)

T.D. September 24, 2010 03:11

Thanks
 
Hi alberto,
finally i let it on, and you are right i descovered many mistakes and solved them, thanks,

i have a question for you please

In the Ico Foam solver, how can i change "nu" to be a function of a scalarField knowing that nu is a dimensioned scalar for example


if i need to solve
fvm::ddt(c)+fvc::div(phi,c) == etc.... (c is a volScalarField defined without any dimension)

but before it i have in the UEqn in IcoFoam "nu" and i need that my nu=(1-c/0.68)

help please


thanks

alberto September 24, 2010 14:26

Define a volScalarField called nuEff after reading nu from transportProperties

Code:

volScalarField nuEff
    (
        IOobject
        (
            "nuEff",
            runTime.timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        mesh,
        nu
    );

Then use this field instead of nu in the UEqn, and update nuEff according to your law.


All times are GMT -4. The time now is 23:29.