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

buoyantBoussinesqPisoFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 4, 2014, 12:36
Default buoyantBoussinesqPisoFoam
  #1
New Member
 
Join Date: Feb 2014
Posts: 16
Rep Power: 12
cristina is on a distinguished road
Hi all,

I have been working on a new solver by modifying the "buoyantBoussinesqPisoFoam".

I have added an explicit source to the temperature equation (as done in the tutorial "porousExplicitSourceReactingParcelFoam" and also an implict source to the momentum equation.
// Solve the momentum equation
fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
// - fvm::Sp(0.5*Cd*LAD*mag(U),U)
// -fvm::Sp(mag(fvc::Sp(Cd*LAD*0.5,U) ),U)
);
UEqn.relax();
if (momentumPredictor)
{
solve
(
UEqn
==
fvc::reconstruct
(
(
fvc::interpolate(rhok)*(g & mesh.Sf())
- fvc::snGrad(p)*mesh.magSf()
)
)
-fvc::Sp(mag(fvc::Sp(Cd*LAD*0.5,U) ),U)
);
}

where Cd is a constant and LAD is a scalarField. I set non uniform values by means of setFieldDict.



//solve the temperature equation
{
volScalarField kappaEff
(
"kappaEff",
turbulence->nu()/Pr + turbulence->nut()/Prt
);
fvScalarMatrix TEqn
(
fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(kappaEff, T)
==
temperatureSource.Su()
);
TEqn.relax();
TEqn.solve();
rhok = 1.0 - beta*(T - TRef);
}

The temperature source is set to a determined reion by means of cellset.

The solver compiles (see attached), but when I intend to run a case, the velocity increases really fast and the simulation crashes. I cannot find the error... ¿maybe in my boundary conditions? (see also case attached).

I would really appretiate any help!

Thanks in advance
Cristina
Attached Files
File Type: zip buoyantBoussinesqPisoFoamESTandISU.zip (11.0 KB, 3 views)
File Type: zip case.zip (12.6 KB, 3 views)
cristina is offline   Reply With Quote

Old   March 5, 2014, 04:43
Default
  #2
New Member
 
Join Date: Feb 2014
Posts: 16
Rep Power: 12
cristina is on a distinguished road
Can anyone help me? This case is driving me crazy. I think it is a question of the pressure boundary conditions....


I attach the error:

Time = 1
Courant Number mean: 0 max: 0 velocity magnitude: 0
deltaT = 1.2
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 3.85069e-07, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 2.56645e-06, No Iterations 4
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 3.41222e-07, No Iterations 2
DILUPBiCG: Solving for T, Initial residual = 1, Final residual = 7.92614e-07, No Iterations 3
DICPCG: Solving for p, Initial residual = 1, Final residual = 0.0849405, No Iterations 58
time step continuity errors : sum local = 0.130643, global = -0.00370545, cumulative = -0.00370545
DICPCG: Solving for p, Initial residual = 0.416228, Final residual = 9.55017e-08, No Iterations 121
time step continuity errors : sum local = 1.74235e-06, global = 6.31575e-08, cumulative = -0.00370539
DILUPBiCG: Solving for epsilon, Initial residual = 0.946356, Final residual = 5.44074e-06, No Iterations 4
DILUPBiCG: Solving for k, Initial residual = 1, Final residual = 4.69753e-06, No Iterations 24
bounding k, min: 0 max: 1.26149 average: 0.731538
ExecutionTime = 0.87 s ClockTime = 0 s
Calculating averages
Time = 2.2
Courant Number mean: 3.273 max: 108.448 velocity magnitude: 25.3325
deltaT = 0.00553259
DILUPBiCG: Solving for Ux, Initial residual = 0.0131585, Final residual = 7.80769e-07, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.00882209, Final residual = 3.03072e-07, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.026238, Final residual = 3.4694e-08, No Iterations 3
DILUPBiCG: Solving for T, Initial residual = 0.0121135, Final residual = 1.79591e-07, No Iterations 2
DICPCG: Solving for p, Initial residual = 0.806607, Final residual = 0.0711915, No Iterations 9
time step continuity errors : sum local = 0.00013445, global = 5.87015e-06, cumulative = -0.00369952
DICPCG: Solving for p, Initial residual = 0.205045, Final residual = 9.95087e-08, No Iterations 127
time step continuity errors : sum local = 3.6426e-10, global = -1.26168e-11, cumulative = -0.00369952
cristina is offline   Reply With Quote

Old   November 19, 2020, 14:02
Default
  #3
New Member
 
damu
Join Date: Feb 2017
Posts: 24
Rep Power: 9
damu1414 is on a distinguished road
Hi Cristina

Thanks for the post.

I have been trying to simulate flow over a heated cylinder using buoyantBoussinesqPisoFoam(foam-extend-4.1). Part of my error has similarities with yours. In addition to the immediate surge in velocity magnitudes, I get the forceCoefficients as 0. I know this is an old post however, I would like to know if you solved this.

Thank you
damu1414 is offline   Reply With Quote

Reply


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



All times are GMT -4. The time now is 21:45.