CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Varying U BC not working for settlingFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By alberto

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 20, 2010, 16:36
Exclamation Varying U BC not working for settlingFoam
  #1
Member
 
Fran
Join Date: Sep 2009
Location: Buenos Aires
Posts: 38
Rep Power: 17
lfbarcelo is on a distinguished road
Hi;

timeVaryingUniformFixedValue does not seem to work for settlingFoam! I'm triyng to use it in order to get a variable inlet velocity in the dahl case, following alberto's instructions (http://albertopassalacqua.com/?p=69), and I get the next error message:

Starting time loop

Time = 0.1

Courant Number mean: 0.0163852 max: 0.0883237
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/opt/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib/libc.so.6"
#3 Foam::interpolationTable<Foam::Vector<double> >:perator()(double) const in "/opt/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libfiniteVolume.so"
#4 Foam::timeVaryingUniformFixedValueFvPatchField<Foa m::Vector<double> >::updateCoeffs() in "/opt/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libfiniteVolume.so"
#5 Foam::fvPatchField<Foam::Vector<double> >::evaluate(Foam::Pstream::commsTypes) in "/opt/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/settlingFoam"
#6 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate() in "/opt/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/settlingFoam"
#7 main in "/opt/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linux64GccDPOpt/settlingFoam"
#8 __libc_start_main in "/lib/libc.so.6"
#9 _start at /build/buildd/eglibc-2.10.1/csu/../sysdeps/x86_64/elf/start.S:116
Fallo de segmentación

I tried the same procedure for the simpleFoam case, pitzDaily, and it worked perfectly, I use OF-1.6.x

Any Ideas?
lfbarcelo is offline   Reply With Quote

Old   April 20, 2010, 18:52
Default
  #2
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Are you using the same file to define the BC in both the cases?

P.S. An unsteady BC in a steady solver (simpleFoam) does not seem correct :-)

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   April 20, 2010, 19:28
Default
  #3
Member
 
Fran
Join Date: Sep 2009
Location: Buenos Aires
Posts: 38
Rep Power: 17
lfbarcelo is on a distinguished road
Hi, thanks for the reply!

I am using the same file. Iīve tried also other settlingFoam cases and they didnīt work either.
The cavity case (icoFoam) worked fine as well with the same file.

There really seems to be some kind of bug in settlingFoam.

pitzDaily never getīs to the steady solution. Velocity values show what I expected in the patch where the variable BC was setled, this means that te timeVaryingUniformFixedValue works!. But the case itself gives out crappy preassure results. I was just testing the variable velocity condition.
lfbarcelo is offline   Reply With Quote

Old   April 20, 2010, 22:26
Default
  #4
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by lfbarcelo View Post
Hi, thanks for the reply!

I am using the same file. Iīve tried also other settlingFoam cases and they didnīt work either.
The cavity case (icoFoam) worked fine as well with the same file.

There really seems to be some kind of bug in settlingFoam.

pitzDaily never getīs to the steady solution. Velocity values show what I expected in the patch where the variable BC was setled, this means that te timeVaryingUniformFixedValue works!. But the case itself gives out crappy preassure results. I was just testing the variable velocity condition.
You are right. There is a problem in the code. If you check createFields.H, you can see Vdj inherits the boundaryField from U, but clearly no interpolation table is available for Vdj, so the code fails when you call

Vdj.correctBoundaryConditions();

in calcVdj.H.

As a temporary fix, waiting for a reply from the developers (I'll open a bug report), considering Vdj is calculated explicitly, you can replace the declaration of Vdj with

Code:
    volVectorField Vdj
    (
        IOobject
        (
            "Vdj",
            runTime.timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::AUTO_WRITE
        ),
        mesh,
        dimensionedVector("0.0", U.dimensions(), vector::zero)
        //,U.boundaryField().types()
    );
The only difference is that the comma and the last line were commented, so to avoid the inheritance of the boundaryField from U.

I hope this helps.

Best,
jiez likes this.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.

Last edited by alberto; April 20, 2010 at 22:26. Reason: removed redundancy
alberto is offline   Reply With Quote

Old   April 20, 2010, 22:33
Default
  #5
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Bug reported here: http://www.cfd-online.com/Forums/ope...tml#post255539
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   April 21, 2010, 14:26
Default
  #6
Member
 
Fran
Join Date: Sep 2009
Location: Buenos Aires
Posts: 38
Rep Power: 17
lfbarcelo is on a distinguished road
Excellent!! the fix you suggested worked perfectly. Thank you!

The bug also exists for alpha BC, since Alpha inherits the boundaryField from alpha.
I tried a similar fix for this BC.

Code:
volScalarField Alpha
    (
        IOobject
        (
            "Alpha",
            runTime.timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::AUTO_WRITE
        ),
        alpha*rhod/rho
        //,alpha.boundaryField().types()
    );
Where I commented the comma and the last line.

But I get the next error message when trying to run the case:

Quote:
Starting time loop

Time = 0.1

Courant Number mean: 0.00597056 max: 0.0488136
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 3.67271e-10, No Iterations 3
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 9.12603e-10, No Iterations 3


--> FOAM FATAL ERROR:

gradientInternalCoeffs cannot be called for a calculatedFvPatchField
on patch lowerWall of field Alpha in file "/home/pablo/OpenFOAM/pablo-1.6.x/run/V_1/0/Alpha"
You are probably trying to solve for a field with a default boundary condition.

From function calculatedFvPatchField<Type>::gradientInternalCoef fs() const
in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 187.

FOAM exiting
How can i get varying alpha to work?

I've tried creating the Alpha BC in the 0 folder of the case, and reading that boundaryField instead of inheriting it from alpha:

Code:
volScalarField Alpha
    (
        IOobject
        (
            "Alpha",
            runTime.timeName(),
            mesh,
            IOobject::AUTO_READ,
            IOobject::AUTO_WRITE
        ),
        alpha*rhod/rho
        //,alpha.boundaryField().types()
    );
I changed NO_READ for AUTO_READ, but i keep getting the same error message.

Any ideas?
lfbarcelo is offline   Reply With Quote

Old   April 21, 2010, 15:02
Default
  #7
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Please add this to the bug report, so that developers can see it.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   April 21, 2010, 15:29
Default
  #8
Member
 
Fran
Join Date: Sep 2009
Location: Buenos Aires
Posts: 38
Rep Power: 17
lfbarcelo is on a distinguished road
Ok, I added it to the bug report. Thank you for your answer. :-)

Best,
lfbarcelo is offline   Reply With Quote

Old   April 21, 2010, 17:45
Default
  #9
Member
 
Fran
Join Date: Sep 2009
Location: Buenos Aires
Posts: 38
Rep Power: 17
lfbarcelo is on a distinguished road
I found a "messy" solution for the alpha problem.

I've tried creating the Alpha BC in the 0 folder of the case, and reading that boundaryField instead of inheriting it from alpha:

Code:
volScalarField Alpha
(
IOobject
(
"Alpha",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
// alpha*rhod/rho
//,alpha.boundaryField().types()
);
I changed NO_READ for MUST_READ, and commented the line where it calculates Alpha for the first step. I also added the word mesh.

It seems to work fine, but I had to manually calculate and create the Alpha bondaryField File in the 0 folder, and apply the timeVaryingUniformFixedValue to this BC instead of applying it to alpha.

P.S.: Note the difference between alpha and Alpha. Alpha= alpha*rhod/rho
lfbarcelo is offline   Reply With Quote

Old   April 21, 2010, 18:02
Default
  #10
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
That's OK. But indeed it's messy :-)

The boundaryField inheritance makes the fields automatically consistent but introduces the problem with the interpolationTable.

To be safe, compare the results of the tutorial with and without the changes.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Reply

Tags
boundary conditions, settlingfoam, varying


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Working Principle of Micro-Oven aero Siemens 2 January 31, 2007 06:00
Help required on working of Micro-oven aero CFX 4 January 19, 2007 09:21
Help required on working of Woven aero FLUENT 0 January 16, 2007 07:25
Time Varying BC A.S. Siemens 1 January 31, 2005 07:37
How to model varying food models in a Blender Raymond CFX 0 July 10, 2004 00:40


All times are GMT -4. The time now is 14:44.