|
[Sponsors] |
May 16, 2022, 13:27 |
new cannot satisfy memory request.
|
#1 |
New Member
Roozbeh Salajeghe
Join Date: Feb 2020
Location: DTU_ Denmark
Posts: 2
Rep Power: 0 |
Dear fomers,
I faced a strange run-time error after doing some small modifications to the interFoam solver, (with a new name interNewFoam after modification) and some of the libraries relevant to the mixture viscosity calculation. All the libraries and the solver were compiled without any warning and error, but when I tried to run the interNewFoam solver on the damBreak tutorial case I faced 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) 1- I modified the "incompressibleTwoPhaseMixture" library. 2- I modified the "immiscibleIncompressibleNewTwoPhaseMixture" library, and linked the modified library of step 1, to this library 3- I linked both of the above libraries to interNewFoam solver, and modified it as well. All the new files, with their new names, are attached. Having tried to solve this issue, I found out that the problem is coming from a very simple thing which is the initialization of two scalar variables. I defined two variables in my incompressibleNewTwoPhaseMixture.H as follows: Code:
const scalar k_; const scalar L_; Code:
Foam::incompressibleTwoPhaseMixture::incompressibleTwoPhaseMixture ( const volVectorField& U, const surfaceScalarField& phi ) : ..., k_(20), L_(2), ... { calcNu(); } Code:
void Foam::incompressibleTwoPhaseMixture::calcNu() { const scalar k_=20.0; const scalar L_=2.0; ... ... } I want to know why this error message appears for the first method (defining the variable in the header file and initializing them in the constructor), while it is a valid C++ variable definition. My src and applications directories, located in the $FOAM_RUN, containing only the two described libraries and the modified interNewFoam solver are attached below. Any comment is appreciated. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
General recommendations for CFD hardware [WIP] | flotus1 | Hardware | 19 | June 23, 2024 19:02 |
new cannot satisfy memory request. | sahm | OpenFOAM Running, Solving & CFD | 18 | May 29, 2024 12:13 |
Error: New Cannot Satisfy Memory Request | TCS | OpenFOAM Programming & Development | 2 | June 5, 2018 11:23 |
new cannot satisfy memory request openFoam!! what is the meaning of this? | adambarfi | OpenFOAM Running, Solving & CFD | 0 | November 2, 2013 14:57 |
[OpenFOAM] Saving ParaFoam views and case | sail | ParaView | 9 | November 25, 2011 16:46 |