CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   problem with using timeVaryingUniform by icoFoam (http://www.cfd-online.com/Forums/openfoam/105775-problem-using-timevaryinguniform-icofoam.html)

amin144 August 8, 2012 17:23

problem with using timeVaryingUniform by icoFoam
 
Hi dear FOAMers
especially Bernhard Gschaider ( usual replier to timeVarying B.C.)

I've read almost all posts about timeVaryingUniform
But I have problem using it
I use OF 1.5-dev and I want to work by viscoelasticFluidFoam solvers
what should I do ? what's the problem ? should I compile anything?

Thanks very much

Error:

Reading field p

Reading field U

Reading/calculating face flux field phi


Starting time loop

Time = 0.005

Courant Number mean: 0 max: 0 velocity magnitude: 0
PBiCG: Solving for Ux, Initial residual = 1, Final residual = 7.46317e-06, No Iterations 5
PBiCG: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0



gradientInternalCoeffs cannot be called for a genericFvPatchField (actual type timeVaryingUniform)
on patch inlet of field p in file "/home/amin/OpenFOAM/amin-1.5-dev/run/cavity/0/p"
You are probably trying to solve for a field with a generic boundary condition.

From function genericFvPatchField<Type>::gradientInternalCoeffs( ) const
in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 692.

FOAM exiting


0/p:

boundaryField
{
inlet
{

type timeVaryingUniform;
timeDataFileName "inlet.dat";
value uniform 1e5 ;
}
outlet
{
type fixedValue;
value uniform 0;
}

wallup
{
type zeroGradient;
}
walllow
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}

inlet.dat:


(
0 1
.01 5
.02 10
.03 20
.07 100
)

amin144 August 8, 2012 17:40

case file
 
1 Attachment(s)
I attached case file for simplicity

amin144 August 9, 2012 09:43

AnyBody answer me this simple question? :(

wyldckat August 9, 2012 10:25

Hi Amin,

Quote:

Originally Posted by amin144 (Post 376092)
I use OF 1.5-dev and I want to work by viscoelasticFluidFoam solvers
what should I do ? what's the problem ? should I compile anything?

I'm not even certain you know what you're asking! ;)

The viscoelasticFluidFoam solver is available in the OpenFOAM variant 1.6-ext, not 1.5-dev. There you will also find tutorials on how to use this solver.
edit: wait, I'm wrong. I completely forgot that they were already present in 1.5-dev :( Sorry about that. But still, I can't fully understand the question...

Good luck!
Bruno

amin144 August 9, 2012 10:27

I'm happy
 
1 Attachment(s)
Quote:

Originally Posted by amin144 (Post 376095)
I attached case file for simplicity

I could do my job by using GroovyBC and this thread:
http://www.cfd-online.com/Forums/ope...ch-normal.html

I attached my case in order to using of others.
I should mention that I used myIcoFoam solver which it's different to icoFoam is adding the line " -lgroovyBC " to "option" file and compile new solver.

After all I'll be happy if someOne say my fault in using timeVaryingUniform

amin144 August 9, 2012 10:33

Hi dear Bruno
Thanks again ;)
I swear GOD I'm not a confused man ( the way you think ;) )
I know what I'm saying :)

The viscoelastic solver exist in 1.5 dev like 1.6 ext
My problem is using the boundary condition "timeVaryingUniform" not using solver
I appreciat if you can upload me a case using this kind of boundary condition

bigphil August 9, 2012 10:50

Quote:

Originally Posted by amin144 (Post 376092)
gradientInternalCoeffs cannot be called for a genericFvPatchField (actual type timeVaryingUniform)
on patch inlet of field p in file "/home/amin/OpenFOAM/amin-1.5-dev/run/cavity/0/p"
You are probably trying to solve for a field with a generic boundary condition.

From function genericFvPatchField<Type>::gradientInternalCoeffs( ) const
in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 692.

FOAM exiting

Hi Amin,

this errors essentially means that the solver can't find the timeVaryingUniform boundary condition.

In OpenFOAM-1.6-ext, there doesn't seem to be a boundary condition called "timeVaryingUniform".

If you check in the directory $FOAM_SRC/finiteVolume/fields/fvPatchFields/derived, you can see the time varying boundary conditions, they are:
timeVaryingFlowRateInletVelocity
timeVaryingMappedTotalPressure
timeVaryingUniformTotalPressure
timeVaryingMappedFixedValue
timeVaryingUniformFixedValue
timeVaryingMappedPressureDirectedInletVelocity
timeVaryingUniformInletOutlet

Maybe you mean to use one of these?

Best regards,
Philip

amin144 August 9, 2012 18:38

Hi dear philip
Thanks for your quick reply

I have used timeVaryingUniformFixedValue but it doesn't work

maybe ma data file is not correct or maybe I should add any library to solver and recompile it
I'm confused

wyldckat August 9, 2012 19:23

1 Attachment(s)
Hi Amin,

You're lucky I had a 1.5-dev build in my machine. I've taken a look at the first case you provided and the modified version is attached.

Changes:
  • I had to fix "wallup" as "Wallup" in the files at the "0" folder.
  • Saw the list of possible BCs by running this command (1.5-dev is really old... the "bananas" trick didn't work :():
    Code:

    tree $FOAM_SRC/finiteVolume/fields/fvPatchFields
  • Switched to "timeVaryingUniformFixedValue" in the file "0/p".
  • icoFoam started complaining about missing info. To be in compliance with the complaints, I ended up with:
    Code:

    inlet
    {
        type timeVaryingUniformFixedValue;
        outOfBounds clamp;
        fileName "inlet.dat";
        value uniform 1e5 ;
    }

  • Also had to modify "inlet.dat" to something more... compliant:
    Code:

    (
     (0.0 1.0)
     (0.01 5 )
     (0.02 10)
     (0.03 20)
     (0.07  100)
    );

Have fun trying to make this work, because with me, icoFoam just blasted the Courant number out of the ballpark...

Best regards,
Bruno

amin144 August 10, 2012 13:18

oh!
What a nice and great favor from you
Thanks dear Bruno

I wish I can help others in future in this forum
Atthaching cases is a good job because someone else who have problem like me can solve his/her problem very very quickly

wyldckat August 10, 2012 13:35

Quote:

Originally Posted by amin144 (Post 376466)
Atthaching cases is a good job because someone else who have problem like me can solve his/her problem very very quickly

Or they'll simply go deeper into trouble... of not knowing what they're doing ;)

amin144 August 11, 2012 05:05

:)
But there isn't any known and clear reference to understanding deeply
maybe trial and error is a way for learning OF
It would be nice and great work if there be a extended and expanded user guide which is summarize of threads in forum

wyldckat August 11, 2012 06:09

Quote:

Originally Posted by amin144 (Post 376548)
It would be nice and great work if there be a extended and expanded user guide which is summarize of threads in forum

Yes it would be great work... and a lot of work... and a lot of time! And very... veeeery tedious :rolleyes:

Nonetheless, there are at least 2 places where you or anyone else can do this kind of information collection and cataloguing:
And as you can see from my signature link, my focus here at the forum has been of cataloguing the installation methods and some other details...


All times are GMT -4. The time now is 18:48.