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

Temporary deallocated error

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

Like Tree6Likes
  • 5 Post By TDidi
  • 1 Post By Friederike

Reply
 
LinkBack Thread Tools Display Modes
Old   March 10, 2009, 11:35
Default hi everyone: i modify the tur
  #1
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 307
Rep Power: 10
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
hi everyone:
i modify the turboFoam to add coriolis force and centrifugal force according to MRFsimpleFoam. and when i run the code it gives errors like:

temporary deallocated

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

FOAM aborting

what is the problem? how can i resolve it?
--------------------code-------------------------
\*---------------------------------------------------------------------------*/

#include "fvCFD.H"
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
#include "incompressible/RASModel/RASModel.H"
#include "MRFZones.H"
#include "IFstream.H"
#include "OFstream.H"

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

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

# include "setRootCase.H"

# include "createTime.H"
# include "createMesh.H"
# include "createFields.H"
//# include "createAverages.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 "readTimeControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"

// Pressure-velocity PISO corrector
{
// Momentum predictor

tmp<fvvectormatrix> UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
);
mrfZones.addCoriolis(UEqn());
UEqn().relax();

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

// --- PISO loop

for (int corr=0; corr<nCorr; corr++)
{
volScalarField rAU = 1.0/UEqn().A();
U = rAU*UEqn().H();
phi = (fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, U, phi);
mrfZones.relativeFlux(phi);
adjustPhi(phi, U, p);

// Non-orthogonal pressure corrector loop
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
// Pressure corrector

fvScalarMatrix pEqn
(
fvm::laplacian(rAU, p) == fvc::div(phi)
);

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

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

# include "continuityErrs.H"

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

turbulence->correct();

//# include "calculateAverages.H"

runTime.write();

//# include "writeNaveragingSteps.H"

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

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

return(0);
}


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

wayne
waynezw0618 is offline   Reply With Quote

Old   July 31, 2010, 04:05
Default
  #2
New Member
 
Robert
Join Date: Mar 2010
Posts: 16
Rep Power: 8
rob3rt is on a distinguished road
Dear Wayne,

I am having a similar "temporary deallocated" problem like you had but only I'm using different solver.

How did you resolve that problem?

Kind Regards,
Robert.
rob3rt is offline   Reply With Quote

Old   June 6, 2011, 04:58
Default
  #3
New Member
 
Dima Risch
Join Date: Jun 2011
Location: Cologne
Posts: 22
Rep Power: 7
dima is on a distinguished road
hallo foamers, i am new to openfoam
got advanced knowlage in C, basic knowlage in C++ and basic knowlage in fluiddynamics

current i am modifying the rhoPisoaFoam (transient) solver, by implementing a porousZone like in rhoPorousSimpleFoam (steadystate)

source code is modified, mesh is modified(porouseZone in pitzDaily), porousZones file is included

partially it works, but with the following setting an error occurs
nUCorrectors 2; => sets pressureImplicitPorosity = true;

i located the error to the "+ fvc::ddtPhiCorr(trAU, rho, U, phi)" part of

phi =
fvc::interpolate(rho)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(trAU, rho, U, phi)
);

what is wrong, how could i resolve this error?

i thought about to do something like

if (pressureImplicitPorosity)
{
phi =
fvc::interpolate(rho)
*(
(fvc::interpolate(U) & mesh.Sf())
);
}
else
{
phi =
fvc::interpolate(rho)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(trAU, rho, U, phi)
);
}

but is it correct in refer to the phi equation? its just a (transient) Corrector term, isn't it?


error message:

Create time

Create mesh for time = 0

Reading thermophysical properties

Selecting thermodynamics package hPsiThermo<pureMixture<constTransport<specieThermo <hConstThermo<perfectGas>>>>>
Reading field rho


Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model type RASModel
Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
Cmu 0.09;
C1 1.44;
C2 1.92;
C3 -0.33;
sigmak 1;
sigmaEps 1.3;
Prt 1;
}

Creating field DpDt

Creating porous zone: porosity
Courant Number mean: 0 max: 0.126355

Starting time loop

Courant Number mean: 0 max: 0.126355
Time = 1e-05

diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for h, Initial residual = 0.55759, Final residual = 7.51342e-05, No Iterations 1


--> FOAM FATAL ERROR:
temporary deallocated

From function const T& tmp<T>:perator()() const
in file /home/dima/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/tmpI.H at line 187.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) in "/home/dima/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/dima/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >:perator()() const in "/home/dima/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/rhoPorousPisoFoam"
#3
in "/home/dima/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/rhoPorousPisoFoam"
#4 __libc_start_main in "/lib64/libc.so.6"
#5
at /usr/src/packages/BUILD/glibc-2.11.2/csu/../sysdeps/x86_64/elf/start.S:116
*/################################################## ###############################################/*

i'm sorry for my not very good english , hope you could understand what i mean
i would be thankful for any kind of reply

with kind regards
Dima
dima is offline   Reply With Quote

Old   June 16, 2011, 12:46
Default
  #4
Member
 
Robert Ong
Join Date: Aug 2010
Posts: 60
Rep Power: 8
rob3rt 0ng is on a distinguished road
Hi Dima,

I think you should decrease both nOuterCorrectors and nCorrectors in system/fvSolution to 1.

Regards,
Robert
rob3rt 0ng is offline   Reply With Quote

Old   June 17, 2011, 05:09
Default
  #5
New Member
 
Dima Risch
Join Date: Jun 2011
Location: Cologne
Posts: 22
Rep Power: 7
dima is on a distinguished road
Hi Robert,
thank you for reply

i try the settings you suggested, but same error occurs

meanwhile i was advised of the rhoPorousMRFPimpleFoam (transient)
and there the above processes term is
set off in OF-1.7.1

Code:
    phi =
        fvc::interpolate(rho)*
        (
            (fvc::interpolate(U) & mesh.Sf())
        //+ fvc::ddtPhiCorr(rUA, rho, U, phi)
        );
and set on in OF-2.0.0

Code:
    phi =
        fvc::interpolate(rho)*
        (
            (fvc::interpolate(U) & mesh.Sf())
          + fvc::ddtPhiCorr(rAU, rho, U, phi)
        );
so i will take a look to the new version

regards, Dima
dima is offline   Reply With Quote

Old   January 12, 2012, 12:06
Default
  #6
New Member
 
Taieb
Join Date: Nov 2011
Location: Germany
Posts: 1
Rep Power: 0
TDidi is on a distinguished road
I had the same problem with the error message: "temporary deallocated" after creating a new turbulent solver.

The problem was missing parenthesis after UEqn for the fvVectorMatrix. So I changed "UEqn" to "UEqn()". Hope it challenges your problem, too.
linch, alquimista, Tobi and 2 others like this.

Last edited by TDidi; January 12, 2012 at 17:39.
TDidi is offline   Reply With Quote

Old   April 29, 2014, 09:24
Default
  #7
New Member
 
Join Date: Nov 2010
Posts: 10
Rep Power: 8
Friederike is on a distinguished road
Thank you so much, Taieb! You saved me a lot of searching and trouble
adkar likes this.
Friederike is offline   Reply With Quote

Old   May 13, 2016, 03:40
Default
  #8
New Member
 
Adkar
Join Date: Apr 2015
Posts: 18
Rep Power: 3
adkar is on a distinguished road
Quote:
Originally Posted by TDidi View Post
I had the same problem with the error message: "temporary deallocated" after creating a new turbulent solver.

The problem was missing parenthesis after UEqn for the fvVectorMatrix. So I changed "UEqn" to "UEqn()". Hope it challenges your problem, too.
Thank you so much for your comment!!!
You saved my day!! I really appreciate your comment
Thank you once again.
adkar is offline   Reply With Quote

Reply

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
GmshToFoam FOAM FATAL ERROR faces deallocated Tobias Prousa (Prousa) Open Source Meshers: Gmsh, Netgen, CGNS, ... 14 January 31, 2012 11:45
ran out of temporary space Al Mazdeh CFX 1 May 27, 2011 09:09
Opening Vs outlet BCs and temporary wall issue Sam CFX 0 January 16, 2008 19:59
FOAM FATAL ERROR points deallocated hoerl OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 0 October 30, 2006 08:47
temporary files won't go to $TMPDIR Jiaying Xu CD-adapco 4 November 27, 2001 06:11


All times are GMT -4. The time now is 08:50.