Running an airfoil case
Hi to everyone,
I want to run a simulation over a 2D airfoil with the following hypothesis: It's a 2D, steady-state, laminar, incompressible simulation so I've modified the simpleFoam solver, switching the turbulence to "off". I've also build a "C mesh" over the airfoil. What I'm now troubling with are the boundary conditions: I thought that the most appropriate BCs would be: - freestream BC for velocity (everywhere except on the foil, where I've put the no slip condition); -freestreamPressure for the pressure; openFoam doesn't like these condition, I think because there isn't a "reference value" for the pressure, but also USING a reference value for the pressure, the simulation "explode" and doesn't converge to any reasonable result. This is my problem. Has anyone any suggestion? :) Thanks in advance Simone |
Why don't you use fixed value and zero Gradient?
With these two you should be able to define your system sufficiently for both velocity and pressure. freestream doesn't make any sense since you know your velocity in most parts of your domain regards |
So you're suggesting:
-U fixedValue (equal to zero) over the airfoil for the no-slip condition; -U fixedValue (different from zero and equal to my desired velocity) over the other patches; -p zeroGradient on every patch except inside the domain where i can fix an arbitrary value? Thanks again Colin |
not exactly:
all values you know you should specify with fixed value. That includes the velocity at the inlet and in the internal field all values you don't know you assign with zero Gradient that includes all pressure values (outlet foil inlet) and velocity at the outlet. The velocity on the foil depends on whether you want to take into account friction or not If so set it to zero if not use slip |
This is the error I get if I use zeroGradient for every pressure patch:
FOAM FATAL IO ERROR: Unable to set reference cell for field p Please supply either pRefCell or pRefPoint Because of that I had thought to set a reference value in one patch. Is there another solution to fix this problem? |
maybe this helps:
what is the internal field of your p file? I set it to uniform 0 |
Me too!
Here's the full list of my patches and relative BC for P: internalField uniform 0; boundaryField { inlet { type fixedValue; value uniform 0; } outlet { type zeroGradient; } top { type zeroGradient; } bottom { type zeroGradient; } foil { type zeroGradient; } front { type empty; } back { type empty; } } if instead of inlet BC set as fixedValue I would set it as zeroGradient I'll obtain that error. |
I found an old p file from my graduation thesis:
(at that time I used OF 1.7.1): Code:
Code:
anymore. This would make your fixedValue definition at the inlet for the pressure obsolete, which I think is better, for you don't know, what pressure values there actually are Further I have to mention, that I didn't use a top and bottom patch for my flow was inclined! Finally I would suggest you to collect all patches with the same properties in one patch (e.g. frontAndBack instead of separate patches front, back -> simply collect the node numbers in the blockMeshDict in one patch definition), this improves readability. |
hi Simone & colin
i working on same project but in 3D. i have 2 question. what is the internal field of your U file? is the freestream velocity? and colin you what solver use for this case? and in fvsolution dic GAMG relevant for P. i use CG. can u attach fvSchemes file & B.C file for U? |
@Colin:
I try to run your mesh with "zeroGradient" everywhere on "my" solver with this parameters for p: solvers { p { solver PCG; preconditioner DIC; tolerance 1e-06; relTol 0.01; } It runs and doesn't create problems! So I can't still understand where the problem is. :( @Saeid: For U i used fixedValue everywhere except on the outlet patch where i put zero gradient. For the solver I can tell you that, since my simulation is steady, I used simpleFoam solver. |
Hi there,
Quote:
see therefore the user manual as reference. Quote:
solvers is limited and I used the GAMG according to a recommendation. My settings for U you can read from my previous posts and the fvSchemes looks as follows: Code:
have changed |
All times are GMT -4. The time now is 01:27. |