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

Boundary Conditions in rhoSimplecFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 18, 2012, 12:22
Default Boundary Conditions in rhoSimplecFoam
  #1
New Member
 
Join Date: Oct 2011
Posts: 20
Rep Power: 15
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, 50 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: 15
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: 15
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: 16
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: 15
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, 05:13
Default
  #6
New Member
 
wangwei
Join Date: Apr 2012
Posts: 9
Rep Power: 14
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, 08:07
Default
  #7
New Member
 
Join Date: Apr 2010
Posts: 13
Rep Power: 16
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, 11:51
Default
  #8
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
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, 08:47
Default regarding BC's of rhoSimplecFoam
  #9
Member
 
sonu
Join Date: Jul 2013
Location: delhi
Posts: 92
Rep Power: 13
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 15:52.
yash.aesi is offline   Reply With Quote

Reply

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


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Impinging Jet Boundary Conditions Anindya Main CFD Forum 25 February 27, 2016 13:58
symmetry boundary conditions in cfx lost.identity CFX 41 May 22, 2013 08:21
OpenFOAM Variable Velocity Boundary Conditions NickolasPl OpenFOAM Programming & Development 2 May 19, 2011 06:37
[Netgen] boundary conditions and mesh exporting vaina74 OpenFOAM Meshing & Mesh Conversion 2 May 27, 2010 10:38
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 05:15


All times are GMT -4. The time now is 05:20.