# help with velocity boundary condition potentialFoam

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

 LinkBack Thread Tools Display Modes
 May 30, 2012, 18:44 help with velocity boundary condition potentialFoam #1 New Member   Hon Fai Choi Join Date: May 2012 Posts: 2 Rep Power: 0 Hi, I am new to the forum and not a CFD specialist. I am interested in the potentialFoam solver of OpenFOAM because I want to solve the Poisson equation with given velocity boundary conditions. I am currently trying to apply the potentialFoam solver on a rectangular domain. I would like to define velocity boundary conditions on two opposing faces of the rectangle and zero gradient on the other two. I have set up the U and p input files as follow: p input file: ----------- dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { inflow { type calculated; } outflow { type calculated; } side { type zeroGradient; } defaultFaces { type empty; } } U input file: ----------- dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inflow { type fixedValue; value uniform (0.707 0.707 0); } outflow { type fixedValue; value uniform (0.707 0.707 0); } side { type zeroGradient; } defaultFaces { type empty; } } where 'inflow' and 'outflow' are the opposing faces with velocity BC. I tried to solve this case, but I get the following error: FOAM FATAL ERROR: gradientInternalCoeffs cannot be called for a calculatedFvPatchField on patch outflow of field p in file "/home/user/Projects/Foam/case/block_test1/0/p" You are probably trying to solve for a field with a default boundary condition. From function calculatedFvPatchField::gradientInternalCoef fs() const in file /opt/openfoam210/src/finiteVolume/lnInclude/calculatedFvPatchField.C at line 186. I also tried setting the pressure boundary conditions on 'inflow' and 'outflow' to zeroGradient instead of calculated, which works, but the resulting velocity field is always perpendicular to these boundaries, even if the boundary velocities that I impose are not. Does anybody have a suggestion to correct this? Maybe I am not using the right type of boundary conditions for the problem that I have in mind. If so, which other boundary condition should I use? thanks, Hon Fai

 May 31, 2012, 09:17 #2 Senior Member     Kyle Mooney Join Date: Jul 2009 Location: Amherst, MA USA - San Diego, CA USA Posts: 321 Rep Power: 10 Perhaps give this a try on the inflow and outflow patches. I don't have much experience with potentialFoam however. For most of the incompressible PISO solvers you need to have pressure defined somewhere to make the solution unique. Code: ```inflow { type zeroGradient; } outflow { type fixedValue; value uniform 0; }```

 May 31, 2012, 19:52 #3 New Member   Hon Fai Choi Join Date: May 2012 Posts: 2 Rep Power: 0 Hi, Thanks for the suggestion. I have tried what you suggested, but the output velocity does not match the boundary values that I input. The pressure distribution stays uniform across the 'inflow' boundary, and the velocities remain perpendicular to the boundary. From what I understand, the velocity is not explicitly solved for in potentialFoam, but only corrected with the calculated pressure. So perhaps I need to reformulate the Poisson equation in a mixed approach that explicitly solves for the velocity and the pressure? I haven't figured out yet how to do this. thanks, Hon Fai

 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 Attesz CFX 7 January 5, 2013 04:32 fumiya OpenFOAM 4 June 17, 2011 02:58 Logan Page OpenFOAM 0 November 19, 2010 18:59 Tudor Miron CFX 15 April 2, 2004 06:18

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

 Contact Us - CFD Online - Top