simpleFoam for laminar pipe parabolic flow
Dear All,
I am trying to add parabolic flow at the inlet. The p and U files are given below. I am not getting satisfactory results. Can anyone tell me where is the problem. FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type fixedValue; value uniform 0; } outlet { type zeroGradient; } Walls { type zeroGradient; } } --------------------------- 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 codedFixedValue; value $internalField; redirectType ramp; code #{ scalar U_0=0.001934; scalar r=0.02595; fixedValueFvPatchVectorField myPatch(*this); forAll(this->patch().Cf(),i) { myPatch[i]=vector(2*U_0*(1-Foam::pow(this->patch().Cf()[i].x(),2)/pow(r,2)),0,0); } operator==(myPatch); #}; } outlet { type zeroGradient; } Walls { type fixedValue; value uniform (0 0 0); } } |
Hi Goutam,
I am also modeling laminar 3D pipe flow. I've found that a poor quality mesh can lead to results that do not match the analytical solution. You may want to try refining your mesh and see if that helps. Also I would suggest switching your inlet and outlet pressure BCs. |
Dear Kallone,
I have checked my mesh and its fine. Since, I am using parabolic BC at the inlet, so I am expecting the same pattern throughout the length and constant centerline velocity profile. I am not getting this at all. I didn't find the problem. Did you get the correct result ??? Thanks. Goutam |
1 Attachment(s)
I am using simpleFoam solver. Please see the attached file. I attached all the files that is necessary to run the problem.
Thanks Goutam |
Hi Goutam,
I am using a constant velocity profile at the inlet but obtain correct results for this scenario using SimpleFoam. Have you tried switching the pressure BCs? That is, specify p = 0 at the outlet and zero gradient at the inlet. You cannot fix both the velocity and the pressure at the inlet at the same time. |
hi april
I have used a constant velocity at the inlet and I also got the correct results using simpleFoam. I will change the pressure Bcs and hope it will work !!! |
All times are GMT -4. The time now is 14:22. |