|
[Sponsors] |
May 28, 2024, 11:10 |
Boundary value problem
|
#1 |
New Member
Join Date: May 2024
Posts: 2
Rep Power: 0 |
Hello everyone,
I'm actually running a simulation for a Poiseuille flow on a modified version of icoFoam that contain a scalar transport. When I try to impose a BC at the inlet for the scalar field I encounter some interpolation probem with the other BC (zeroGradient) imposed on the walls :bc.jpg As you cas see, instead of staying at 0, the scalar value goes up to 0.65 at the bottom and the top wall. I coded the BC like this : Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object C; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0.13; boundaryField { top { type zeroGradient; } floor { type zeroGradient; } Inlet { type codedFixedValue; value uniform 0.; name poiseuille; code #{ const vectorField& Cf = patch().Cf(); scalarField& field = *this; const scalar p0 = 1.52818931e-01; const scalar p1 = 1.09857452e-02 ; const scalar p2 = 1.14534928e-04 ; const scalar p3 = -5.58183299e-05; const scalar p4 = -3.93447609e-05; forAll(Cf, faceI) { const scalar y = Cf[faceI][1]; field[faceI] = (p0+p1*y*1e6+p2*pow(y*1e6,2)+p3*pow(y*1e6,3)+p4*pow(y*1e6,4))*(erf(y*1e6+5)+erf(-y*1e6+6))/2+(erf(y*1e6+4)+erf(-y*1e6+6))/10*(1-(erf(y*1e6+5)+erf(-y*1e6+6))/2); } #}; } Outlet { type zeroGradient; } frontAndBack { type empty; } } // ************************************************************************* // Do you know how I could solve this issue ? Thanks in advance |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Table bounds warnings at: END OF TIME STEP | CFXer | CFX | 4 | July 17, 2020 00:44 |
CFD analaysis of Pelton turbine | amodpanthee | CFX | 31 | April 19, 2018 19:02 |
Centrifugal fan-reverse flow in outlet lesds to a mass in flow field | xiexing | CFX | 3 | March 29, 2017 11:00 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 18:11 |
domain imbalance for enrgy equation | happy | CFX | 14 | September 6, 2012 02:54 |