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

Error: New Cannot Satisfy Memory Request

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 3, 2017, 06:56
Default Error: New Cannot Satisfy Memory Request
  #1
TCS
New Member
 
Thomas C. Sykes
Join Date: Jul 2017
Location: University of Leeds, UK
Posts: 11
Rep Power: 9
TCS is on a distinguished road
Hi,

I'm editing the InterFoam solver to add an additional transport equation (for a passive scalar). To construct the compressive term (equiv. in alpha) in the scalar transport equation, I create a new normal (equiv. src/transportProperties/transportProperties.H).

This is fine, except when I run the solver, I get the following error:
Code:
new cannot satisfy memory request.
This does not necessarily mean you have run out of virtual memory.
It could be due to a stack violation caused by e.g. bad use of pointers or an out of date shared library
Aborted (core dumped)
I strongly believe that memory is not the root cause of the issue. My added code:

Code:
// Overall normal for c
surfaceVectorField nHatfv_forc(gradcf/( mag(gradcf) + ( 1e-8/pow(average(c.mesh().V()),1.0/3.0) ) ));

// Cell surface vector
const surfaceVectorField& Sf = mesh.Sf();

// nHat dot Sf 
const surfaceScalarField& nHat_forc = nHatfv_forc & Sf;

// Standard face-flux compression coefficient
surfaceScalarField Aphic(cCzbja.value()*mag(phi/mesh.magSf()));

// Phi r (THIS LINE)
surfaceScalarField Aphir(Aphic*nHat_forc);

// 1 - c
surfaceScalarField c2(1.0 - fvc::interpolate(c));

// Explicit flux of c
surfaceScalarField phicc(fvc::interpolate(c)*( phi + c2*Aphir ));
If I comment out the line of code labelled THIS LINE, and everything after, it's fine. If not, it's not fine...

Any help appreciated. Thanks in advance
TCS is offline   Reply With Quote

Old   October 4, 2017, 05:47
Default Found the Problem!
  #2
TCS
New Member
 
Thomas C. Sykes
Join Date: Jul 2017
Location: University of Leeds, UK
Posts: 11
Rep Power: 9
TCS is on a distinguished road
Ok, I found the obvious mistake I made! In case anyone else is struggling with a similar issue (now or in the future):

Clearly nHat_forc and (in general) Sf need to change during the simulation, so using const to define them as not modifiable is a bad idea!

Replace
Code:
const surfaceVectorField& Sf = mesh.Sf();
with
Code:
surfaceVectorField Sf = mesh.Sf();
and similarly for nHat_forc.

My bad!
TCS is offline   Reply With Quote

Old   June 5, 2018, 11:23
Default ERROR: new cannot satisfy memory request
  #3
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Hi foamers

I have created a new viscosity model and compiled it successfully. But when I want to test it in a case it gives me this error:

Quote:
new cannot satisfy memory request.
This does not necessarily mean you have run out of virtual memory.
It could be due to a stack violation caused by e.g. bad use of pointers or an out of date shared library
Aborted (core dumped)
And here is the code that is want to calculate "etaP_T" :

Code:
Foam::PTTlinearTempDep::PTTlinearTempDep
(
    const word& name,
    const volVectorField& U,
    const surfaceScalarField& phi,
    const dictionary& dict
)
:
    constitutiveEq(name, U, phi),
    tau_
    (
        IOobject
        (
            "tau" + name,
            U.time().timeName(),
            U.mesh(),
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        U.mesh()
    ),
    lambda_(dict.lookup("lambda")),
    etaP_T
    (
        IOobject
        (
            name,
            U.time().timeName(),
            U.db(),
            IOobject::NO_READ,
            IOobject::AUTO_WRITE
        ),
        calcEtaP_T()
    )

{
 checkForStab(dict);
}
What's wrong with that?

Thanks
alimea 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
new cannot satisfy memory request. sahm OpenFOAM Running, Solving & CFD 18 May 29, 2024 12:13
new cannot satisfy memory request openFoam!! what is the meaning of this? adambarfi OpenFOAM Running, Solving & CFD 0 November 2, 2013 14:57
Lenovo C30 memory configuration and discussions with Lenovo matthewe Hardware 3 October 17, 2013 11:23
[OpenFOAM] Saving ParaFoam views and case sail ParaView 9 November 25, 2011 16:46
IcoDyMFoam New cannot satisfy memory request yuhai OpenFOAM Running, Solving & CFD 2 December 10, 2008 06:15


All times are GMT -4. The time now is 18:54.