# Boundary Conditions Problem

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 30, 2013, 06:04 Boundary Conditions Problem #1 Member   Himanshu Sharma Join Date: Jul 2012 Posts: 81 Rep Power: 5 Hi, I am trying to simulate a jet flow inside a square domain i have imported my mesh geometry successfully inside OpenFoam. the boundary conditions i need to specify is shown in the diagram below. The inlet velocity in y direction ,the outlets are all the faces which are at atmospheric pressure i am unable to fix the problem with the boundary condition specification projet2.png /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type zeroGradient; } wall { type zeroGradient; } outlet { type fixedValue; value uniform 0; } } // ************************************************** *********************** // this is my pressure boundary condition file please see if i am wrong any where also adding my velocity boundary condition file Code: ```/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { type inletOutlet; inletValue uniform (-2 0 0); value (0 0 0); } wall { type fixedValue; value uniform (0 0 0); } outlet { type fixedValue; value uniform (0 0 0); } } // ************************************************************************* //``` i am running the simulation with icoFoam its running but not showing any results. if some body can help on this issue. thanks

 January 30, 2013, 11:26 #2 Member   Ali Khalifesoltani Join Date: Mar 2011 Location: Esfahan, Iran Posts: 52 Rep Power: 6 Hi himanshu28, According to the problem geometry that you have attached the velocity Inlet should be (0 -2 0), not (-2 0 0). Regards, Ali

January 30, 2013, 13:46
Thanks &Query
#3
Member

Himanshu Sharma
Join Date: Jul 2012
Posts: 81
Rep Power: 5
Quote:
 Originally Posted by asoltoon Hi himanshu28, According to the problem geometry that you have attached the velocity Inlet should be (0 -2 0), not (-2 0 0). Regards, Ali
Hi,

Thanks for the reply. I have made this correction but still my pressure conditions are not so satisfactory if you can comment on which "type" to choose for specifying it.i will attach some of my results jet27.pngvector.png

I have use icoFoam and i am still not able to achieve steady state solution i think that is the on reason that i am not able to see the complete movement of fluid in the domain

 February 1, 2013, 08:42 Pressure Outlet condition ?? #4 Member   Himanshu Sharma Join Date: Jul 2012 Posts: 81 Rep Power: 5 I have edited my model a bit and provided an inlet hole and outlet hole but i am confused in the pressure conditions on the wall presently what i have done is this Code: ```/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type zeroGradient; } outlet { type fixedValue; value uniform 100; } wall { type zeroGradient; } } // ************************************************************************* //``` i have attached my geometry also have a look at it newjet.png the inlet is from right and the outlet is from left phase ..with these set of pressure cond. i am using ico Foam solver for my case .and getting following error. after time 0.06 Code: ```#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 in "/lib/libc.so.6" #3 Foam::PBiCG::solve(Foam::Field&, Foam::Field const&, unsigned char) const in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #4 in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/icoFoam" #5 in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/icoFoam" #6 in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/icoFoam" #7 __libc_start_main in "/lib/libc.so.6" #8 in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/icoFoam" Floating point exception``` Is my pressure conditions at wall are right i have this doubt also. i want to see the effect of inlet jet in the square box if pressure outlet is provided only on the left part.

 February 2, 2013, 08:54 #5 Member   Ali Khalifesoltani Join Date: Mar 2011 Location: Esfahan, Iran Posts: 52 Rep Power: 6 Hi himanshu28, I don't know what the error means, but it seems that your pressure B.C. is OK. How about the velocity B.C.? Did you define it correctly? the inlet velocity B.C. should be fixedValue, outlet should be zeroGradient, & wall should be fixedValue and equal to 0. Regards, Ali

February 3, 2013, 02:14
Problem unresolved
#6
Member

Himanshu Sharma
Join Date: Jul 2012
Posts: 81
Rep Power: 5
Quote:
 Originally Posted by asoltoon Hi himanshu28, I don't know what the error means, but it seems that your pressure B.C. is OK. How about the velocity B.C.? Did you define it correctly? the inlet velocity B.C. should be fixedValue, outlet should be zeroGradient, & wall should be fixedValue and equal to 0. Regards, Ali
Hi,
I have specifed the same velocity boundaray conditions attaching the code
Code:
```/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
version     2.0;
format      ascii;
class       volVectorField;
object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
inlet
{
type            fixedValue;
value           uniform (0 0 -12);
}

outlet
{

}

wall
{
type            fixedValue;
value           uniform (0 0 0);
}
}

// ************************************************************************* //```
the solver gives the same error. If i visualize a section at the inlet there is no inflow coming or developing inside the box. see the attachment jet2.png

the jet is not at all developing inside the box it seems something wrong with my boundary conditions only.Should i provide zeroGradient of velocity at the wall?
I have a unstructured mesh(tetrahedral imported form ICEM) is it the cause.

 February 3, 2013, 02:39 #7 Member   Ali Khalifesoltani Join Date: Mar 2011 Location: Esfahan, Iran Posts: 52 Rep Power: 6 Hi, When the error occures? after a few timesteps going on or before the solution starts? zeroGradient means that your variable has equal magnitude to the cell beside it. so if your B.C. is no-slip wall it seems that using this condition is not true. could you attach your last screenshot containing coordinate axis(x,y,z)? and could you take a screen shot of terminal that contains a few lines before your error until the end? Regards

February 4, 2013, 06:05
#8
Member

Himanshu Sharma
Join Date: Jul 2012
Posts: 81
Rep Power: 5
Quote:
 Originally Posted by asoltoon Hi, When the error occures? after a few timesteps going on or before the solution starts? zeroGradient means that your variable has equal magnitude to the cell beside it. so if your B.C. is no-slip wall it seems that using this condition is not true. could you attach your last screenshot containing coordinate axis(x,y,z)? and could you take a screen shot of terminal that contains a few lines before your error until the end? Regards
hi,
I have attached some pics. the error comes after running some time step. as u would see in the error pic. so please see and suggest if i need to make corrections in my boundary conditions.cordi.jpgdia.pngerror.jpg

 February 4, 2013, 06:13 #9 Member   Martin Join Date: Nov 2011 Posts: 30 Rep Power: 5 Hello himanshu28, I think the Problem is the boundary file p. Try this: Code: ```/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 98000; boundaryField { inlet { type fixedValue; value uniform 98000; } outlet { type zeroGradient; } wall { type zeroGradient; } } // ************************************************************************* //```

 February 4, 2013, 07:04 #10 Member   Ali Khalifesoltani Join Date: Mar 2011 Location: Esfahan, Iran Posts: 52 Rep Power: 6 Hi, As I see the problem settings is such that the courant number becomes much larger than allowed value and so cause the solution to diverge. you must change your boundary as the courant number reduces. there is some suggestions: 1- decrease the inlet velocity and run the problem again. 2- as wernsen said make the initial pressure equal to inlet pressure and set the outlet pressure as zeroGradient. 3- make a finer mesh so that the courant number will decrease. this method is recommended only if you don't have any permission to change the other B.C.s and will make your solution very time consuming. 4- decrease your time-step to decrease Co Number. 5- a blend of 4 past suggestions. Regards, Ali

 February 4, 2013, 07:39 Thanks &Query #11 Member   Himanshu Sharma Join Date: Jul 2012 Posts: 81 Rep Power: 5 hi, Thanks for the reply . But what this 98000 stand for i am trying to put the same boundary conditions on the given problem. As you can see my error message pic that the Courant number is reaching way high should i reduce the time step more presently i am trying to run the solution for start time 0.0 end time 0.3 deltaT 0.001 is it the problem? its giving error....problem unresolved.

February 4, 2013, 08:28
#13
Member

Martin
Join Date: Nov 2011
Posts: 30
Rep Power: 5
Quote:
 Originally Posted by himanshu28 hi, Thanks for the reply . But what this 98000 stand for i am trying to put the same boundary conditions on the given problem. As you can see my error message pic that the Courant number is reaching way high should i reduce the time step more presently i am trying to run the solution for start time 0.0 end time 0.3 deltaT 0.001 is it the problem? its giving error....problem unresolved.
did you try the new p boundary condition? Maybe you shoud use the "adjustTimeStep yes;" in your controlDict to overcome these huge co numbers.

 February 4, 2013, 08:31 #14 Member   Martin Join Date: Nov 2011 Posts: 30 Rep Power: 5 oh and the "internalField 98000" ist the initial value (t=0) of your internal p-field in Pa. I always had problems with a initial value of 0 Pa. Last edited by wernsen; February 4, 2013 at 08:32. Reason: typo

February 5, 2013, 01:16
#15
Member

Himanshu Sharma
Join Date: Jul 2012
Posts: 81
Rep Power: 5
Quote:
 Originally Posted by wernsen oh and the "internalField 98000" ist the initial value (t=0) of your internal p-field in Pa. I always had problems with a initial value of 0 Pa.
OK..i have tryed these set of boundary conditions but still my courant number is going very high i think i should pack more number of cells inside my domain.In the previous case (my first post ) i had a single slit and in the box and the mesh count was nearly 1200000+ hence there was no issues with that, in my present case i have on 13000+ cells only i think the cell count that is the mesh may be the reason for it.I am trying to refine my mesh and i think then it should work because according to prescribed boundary conditions in Open Foam and our set boundary conditions are satisfying the flow physics also.i hope it works

February 5, 2013, 01:22
#16
Member

Himanshu Sharma
Join Date: Jul 2012
Posts: 81
Rep Power: 5
Quote:
 Originally Posted by asoltoon Hi, As I see the problem settings is such that the courant number becomes much larger than allowed value and so cause the solution to diverge. you must change your boundary as the courant number reduces. there is some suggestions: 1- decrease the inlet velocity and run the problem again. 2- as wernsen said make the initial pressure equal to inlet pressure and set the outlet pressure as zeroGradient. 3- make a finer mesh so that the courant number will decrease. this method is recommended only if you don't have any permission to change the other B.C.s and will make your solution very time consuming. 4- decrease your time-step to decrease Co Number. 5- a blend of 4 past suggestions. Regards, Ali
Hi,

The 3rd options which us you suggested will work i think. As I think there are less number of cells being packed and hence the my CFL number is shooting up now i am trying to mesh my geometry with finer grid hope it works.

Regards
Himanshu

February 8, 2013, 08:11
Problem unresolved
#17
Member

Himanshu Sharma
Join Date: Jul 2012
Posts: 81
Rep Power: 5
Quote:
Hi,

I tryed your suggestions i refined my mesh, set my boundary conditions as discussed previously but the error is still coming and my Courant number is still shooting up like anything..... i don't know what to do.i will be tell step by step procedure that i did,

1) generated mesh using ICEM--->converted to .msh formate for Ansys fluent.
2) Used conversion option of OpenFoam and converted to foam mesh.
3) Edited my "p , U conditions" -->edited timeStep in "controlDict 0.0001"
4.)Run IcoFoam solver to solve.
5.)the same error after running some iterations.

Do i need to have a "setField" file to define pressure conditions inside the domain if required how to do that since i have defined 3 patches only inlet outlet and wall i case across this file searching in tutorials.
I am attaching the pics of my mesh statics.
mesh.jpg

 February 8, 2013, 09:52 #18 Senior Member   Dr. Alexander Vakhrushev Join Date: Mar 2009 Posts: 213 Rep Power: 10 Hi! Just upload your case or give a link (you can put it on the Googl drive e.g.) __________________ Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Advanced Process Simulation of Solidification and Melting" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben Franz-Josef-Str. 18 A - 8700 Leoben Österreich / Austria Tel.: +43 3842 - 402 - 3125 http://smmp.unileoben.ac.at

 February 8, 2013, 09:54 #19 Senior Member   Dr. Alexander Vakhrushev Join Date: Mar 2009 Posts: 213 Rep Power: 10 One quick advice: you can start from potentialFoam solution to improve your initial conditions. __________________ Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Advanced Process Simulation of Solidification and Melting" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben Franz-Josef-Str. 18 A - 8700 Leoben Österreich / Austria Tel.: +43 3842 - 402 - 3125 http://smmp.unileoben.ac.at

February 8, 2013, 10:53
case file on googleDOC
#20
Member

Himanshu Sharma
Join Date: Jul 2012
Posts: 81
Rep Power: 5
Quote:
 Originally Posted by makaveli_lcf One quick advice: you can start from potentialFoam solution to improve your initial conditions.

this is my case link at google Drive.

Last edited by himanshu28; February 9, 2013 at 01:34.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post volo87 CFX 5 June 14, 2013 17:44 moomba Main CFD Forum 2 February 17, 2010 04:37 saii CFX 2 September 18, 2009 08:07 Mahiboobswamulu Main CFD Forum 10 August 26, 2003 13:24 reinaldo kuhn Phoenics 1 March 27, 2003 12:46

All times are GMT -4. The time now is 16:24.

 Contact Us - CFD Online - Top