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

Appeal to developersMRFicoFoam getting this error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 30, 2008, 08:06
Default Hello All I am trying to ma
  #1
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Hello All

I am trying to make transient solver with MRF using icoFoam as the base (PISO pressure-velocity) coupling.

The solver compiles but while running I get this error:

---------------
Create time

Create mesh for time = 0

faceZone::New(const word&, const dictionary&, const label, const faceZoneMesh&) : constructing faceZone
cellZone::New(const word&, const dictionary&, const label, const cellZoneMesh&) : constructing cellZone
Reading transportProperties

Reading field p

Reading field U

Reading/calculating face flux field phi


Starting time loop

Time = 0.0005

Courant Number mean: 0 max: 0
smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 3.18118e-06, No Iterations 1
smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 3.18118e-06, No Iterations 1


--> FOAM FATAL ERROR : temporary deallocated

From function T& tmp<t>::operator()()
in file /home/openfoam/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude/tmpI.H at line 164.

FOAM aborting

Aborted

----------------

As far as I understand it has do something with the definition of UEqn. In the case of MRFSimpleFaom it is defined as :

tmp<fvvectormatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divR(U)
);

Then coriolis force is added as source term to the cellZone

mrfZones.addCoriolis(UEqn());

UEqn is relaxed and solved:

UEqn().relax();
solve(UEqn() == -fvc::grad(p));

Pressure BC fixed:

p.boundaryField().updateCoeffs();

U is formulated as U(H)/ap and flux calculated

volScalarField rAU = 1.0/UEqn().A();
U = rAU*UEqn().H();
UEqn.clear();
phi = fvc::interpolate(U, "interpolate(HbyA)") & mesh.Sf();

Fluxes at the interface of rotating and static cellZones corrected

mrfZones.relativeFlux(phi);
adjustPhi(phi, U, p);

and then pressure equation is solved.

On the similar lines here is the MRFicoFoam:

-------------------------------------------

#include "fvCFD.H"
#include "MRFZones.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

int main(int argc, char *argv[])
{

# include "setRootCase.H"

# include "createTime.H"
# include "createMesh.H"
# include "createFields.H"
# include "initContinuityErrs.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


Info<< "\nStarting time loop\n" << endl;

for (runTime++; !runTime.end(); runTime++)
{
Info<< "Time = " << runTime.timeName() << nl << endl;


# include "readPISOControls.H"
# include "CourantNo.H"

tmp<fvvectormatrix> UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(nu, U)
);


//Add corilios force source term (absolute frame formulation)to the UEqn for the defined cellZone
mrfZones.addCoriolis(UEqn());

//Momentum predictor
solve(UEqn == -fvc::grad(p));
// --- PISO loop

for (int corr=0; corr<nCorr; corr++)
{

//formulate U as U(H)/ap
volScalarField rUA = 1.0/UEqn().A();
U = rUA*UEqn().H();

//formulate velocity flux phi
phi = (fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, U, phi);

//account for the fluxes at the interface between rotating cellZone and static cellZone
mrfZones.relativeFlux(phi);

adjustPhi(phi, U, p);

for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::laplacian(rUA, p) == fvc::div(phi)
);

pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();

if (nonOrth == nNonOrthCorr)
{
phi -= pEqn.flux();
}
}

# include "continuityErrs.H"

U -= rUA*fvc::grad(p);
U.correctBoundaryConditions();
}

runTime.write();

Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}

Info<< "End\n" << endl;

return(0);
}


The error has something to do with the UEqn definition as MRFSimpleFoam uses tmp<fvvectormatrix> UEqn

and in icoFoam it is fvVectorMatrix UEqn.

Experts Please take a look and suggest where I am wrong.

With Best Regards
Jaswi
jaswi is offline   Reply With Quote

Old   May 9, 2008, 07:55
Default can't you just use the the UEq
  #2
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
can't you just use the the UEqn definition from icoFoam, why should you use the tmp?

Cheers, Frank
__________________
Frank Bos
lr103476 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: Floating point error: invalid number fpingqian FLUENT 4 February 8, 2012 01:20
Errors when Compiling UDF: error C2040/error C2099 Julian K. FLUENT 1 December 21, 2008 00:23
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas COMSOL 1 May 30, 2008 04:35
"Error: Floating point error: invalid number" MI Kim FLUENT 2 January 4, 2007 10:00
Fatal error error writing to tmp No space left on device maka OpenFOAM Installation 2 April 3, 2006 08:48


All times are GMT -4. The time now is 17:06.