CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Boundary Conditions in rhoSimplecFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 18, 2012, 12:22
Default Boundary Conditions in rhoSimplecFoam
  #1
New Member
 
Join Date: Oct 2011
Posts: 20
Rep Power: 5
rawe666 is on a distinguished road
Hello friends,
I am trying to make a turbulent flow simulation with using rhoSimplecFoam ver. OpenFOAM-2.1.0. When I run my case after 12 iteration I get an error message. After spending lots of time and many attempts I decided to open a tread in forum. Could someone help me where is the mistake in my boundary conditions? If someone corrects my BCs, that tread can be an example for other foamers.

Inlet
P : totalPressure
U : pressureDirectedInletVelocity
T : fixedValue
k : fixedValue
mut : fixedValue
epsilon : compressible::turbulentMixingLengthDissipationRate Inlet
alphat : fixedValue

Outlet
P : fixedValue
U : zeroGradient
T : fixedValue
k :zeroGradient
mut : zeroGradient
epsilon : fixedValue
alphat : fixedValue

FixedWalls
P : zeroGradient
U : fixedValue (0 0 0)
T : zeroGradient
k : compressible::kqRWallFunction
mut : mutkWallFunction
epsilon : compressible::epsilonWallFunction
alphat : alphatWallFunction

Left
cyclic

Right
cyclic


I do not know exact outlet pressure. But I can make a good guess for it. My velocities are low and at the outlet they must be slower than the inlet. I can guess it from the formula of total pressure.

Thanks in advance!
Regards
Gökhan
Attached Files
File Type: gz 0.tar.gz (1.5 KB, 48 views)
rawe666 is offline   Reply With Quote

Old   March 5, 2012, 11:47
Default
  #2
Member
 
Pierre Castellani
Join Date: Apr 2011
Location: Paris
Posts: 38
Rep Power: 6
pcaste12 is on a distinguished road
Hi Gökha,
I don't if I could help but what kind of error did you get?
Pierre.
pcaste12 is offline   Reply With Quote

Old   March 13, 2012, 10:40
Default
  #3
New Member
 
Join Date: Oct 2011
Posts: 20
Rep Power: 5
rawe666 is on a distinguished road
Hi Pierre,

I played with the relaxation factors and now I am able to run the simulation but results are not like what I expected. Thats why I changed boundaries again like the following lines;

for the velocity -- used fixedValue at the inlet, zeroGradient at the outlet.
for the pressure -- used zeroGradient at inlet, total pressure at the outlet.
With lower relaxation values.

It works fine and convergence is fast. But I have a small doubt regarding rho. It seems to be constant. Now trying to understand rho file.
rawe666 is offline   Reply With Quote

Old   March 15, 2012, 03:28
Default
  #4
New Member
 
Join Date: Apr 2010
Posts: 13
Rep Power: 7
samsi is on a distinguished road
Hi,
check the 0/fvsolution file. There is the possibility to enter a rhoMin and rhoMax value. Have you set them to a realistic value for your case?

SIMPLE
{
nNonOrthogonalCorrectors 0;
rhoMin rhoMin [1 -3 0 0 0] 0.8;
rhoMax rhoMax [1 -3 0 0 0] 1.4;
transonic yes;
samsi is offline   Reply With Quote

Old   March 15, 2012, 12:10
Default
  #5
New Member
 
Join Date: Oct 2011
Posts: 20
Rep Power: 5
rawe666 is on a distinguished road
Hi samsi,

you solved my problem. Somehow, I used values 0.1 and 1 which are out of my density range. Now I changed the interval and I am able to see that rho is not constant anymore. Thanks!
rawe666 is offline   Reply With Quote

Old   April 4, 2012, 04:13
Default
  #6
New Member
 
wangwei
Join Date: Apr 2012
Posts: 9
Rep Power: 5
buaawangwei is on a distinguished road
Hi samsi,
can you explain the "transonic yes"?
Thank you
buaawangwei is offline   Reply With Quote

Old   April 4, 2012, 07:07
Default
  #7
New Member
 
Join Date: Apr 2010
Posts: 13
Rep Power: 7
samsi is on a distinguished road
Hello,
sorry i can't give you an explanation for this... maybe someone else can do this... ?
samsi is offline   Reply With Quote

Old   May 15, 2012, 10:51
Default
  #8
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,077
Blog Entries: 4
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

i am not sure if its actuall but the transonic option is a switch in the equation of the pEqn.H file:

if transonic true;

Code:
    {
        surfaceScalarField phid
        (
            "phid",
            fvc::interpolate(psi*U) & mesh.Sf()
        );

        surfaceScalarField phic
        (
            "phic",
            fvc::interpolate(rho/AtU - rho/AU)*fvc::snGrad(p)*mesh.magSf()
          + phid*(fvc::interpolate(p) - fvc::interpolate(p, "UD"))
        );

        //refCast<mixedFvPatchScalarField>(p.boundaryField()[1]).refValue()
        //    = p.boundaryField()[1];

        fvScalarMatrix pEqn
        (
            fvm::div(phid, p)
          + fvc::div(phic)
          - fvm::Sp(fvc::div(phid), p)
          + fvc::div(phid)*p
          - fvm::laplacian(rho/AtU, p)
        );
        //pEqn.relax();

        pEqn.setReference(pRefCell, pRefValue);

        pEqn.solve();

        if (simple.finalNonOrthogonalIter())
        {
            phi == phic + pEqn.flux();
        }
    }
if transonic false;
Code:
        phi = fvc::interpolate(rho*U) & mesh.Sf();
        closedVolume = adjustPhi(phi, U, p);
        phi += fvc::interpolate(rho/AtU - rho/AU)*fvc::snGrad(p)*mesh.magSf();

        fvScalarMatrix pEqn
        (
            fvc::div(phi)
        //- fvm::laplacian(rho/AU, p)
          - fvm::laplacian(rho/AtU, p)
        );

        pEqn.setReference(pRefCell, pRefValue);

        pEqn.solve();

        if (simple.finalNonOrthogonalIter())
        {
            phi += pEqn.flux();
        }
additionally you are relaxing rho if transonic = false

Code:
if (!simple.transonic())
{
    rho.relax();
}
Tobi
Tobi is offline   Reply With Quote

Old   August 28, 2013, 07:47
Default regarding BC's of rhoSimplecFoam
  #9
Member
 
sonu
Join Date: Jul 2013
Location: delhi
Posts: 79
Rep Power: 3
yash.aesi is on a distinguished road
helo ,
i am trying to simulate cold flow in my case using rhoSimplecFoam . my case is having 2 inlets , upper wall (fixed ), outlet and axis of symmetry . after running the case following error and as per my knowledge it is due to the BC's . So can anybody plz have a look on my BC's and tell me whr i am doin wrong .
thanks in advance

Code:
 Time = 44

GAMG:  Solving for Ux, Initial residual = 0.72868, Final residual = 0.0331103, No Iterations 1
GAMG:  Solving for Uy, Initial residual = 0.964565, Final residual = 0.00777282, No Iterations 1
GAMG:  Solving for e, Initial residual = 0.827116, Final residual = 0.00785967, No Iterations 1
GAMG:  Solving for p, Initial residual = 0.242665, Final residual = 0.0241799, No Iterations 2
time step continuity errors : sum local = 0.308447, global = -0.151188, cumulative = -1.05624
rho max/min : 1 0.1
GAMG:  Solving for epsilon, Initial residual = 0.089338, Final residual = 1.19406e-05, No Iterations 1
GAMG:  Solving for k, Initial residual = 0.778841, Final residual = 0.00695333, No Iterations 1
bounding k, min: 6.9946e-16 max: 2794 average: 2.36892
ExecutionTime = 1150.91 s  ClockTime = 1151 s

Time = 45

GAMG:  Solving for Ux, Initial residual = 0.561691, Final residual = 0.0130153, No Iterations 1
GAMG:  Solving for Uy, Initial residual = 0.975585, Final residual = 0.0459448, No Iterations 1
GAMG:  Solving for e, Initial residual = 0.908425, Final residual = 0.00318615, No Iterations 2
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() at ??:?
#4  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:?
#5  
 at ??:?
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7  
 at ??:?
Floating point exception (core dumped)
Attached Files
File Type: zip 0.zip (4.3 KB, 3 views)

Last edited by wyldckat; August 31, 2013 at 14:52.
yash.aesi is offline   Reply With Quote

Reply

Tags
bcs, boundary conditions, rhosimplecfoam, turbulence, turbulent flows

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
symmetry boundary conditions in cfx lost.identity CFX 41 May 22, 2013 07:21
Impinging Jet Boundary Conditions Anindya Main CFD Forum 24 January 11, 2012 14:40
OpenFOAM Variable Velocity Boundary Conditions NickolasPl OpenFOAM Programming & Development 2 May 19, 2011 05:37
boundary conditions and mesh exporting vaina74 Open Source Meshers: Gmsh, Netgen, CGNS, ... 2 May 27, 2010 09:38
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15


All times are GMT -4. The time now is 03:26.