|
[Sponsors] |
March 4, 2014, 11:36 |
buoyantBoussinesqPisoFoam
|
#1 |
New Member
Join Date: Feb 2014
Posts: 16
Rep Power: 12 |
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 |
|
|
|