|
[Sponsors] |
help with velocity boundary condition potentialFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 30, 2012, 19: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<Type>::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, 10:17 |
|
#2 |
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18 |
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, 20: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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |
Robin boundary condition for the velocity | fumiya | OpenFOAM | 4 | June 17, 2011 03:58 |
velocity boundary condition | Logan Page | OpenFOAM | 0 | November 19, 2010 18:59 |
New topic on same subject - Flow around race car | Tudor Miron | CFX | 15 | April 2, 2004 07:18 |