CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Failed to store pointer: grad(U). Risk of memory leakage simpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Gyros
  • 1 Post By Nafiz375

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 27, 2024, 02:41
Default Failed to store pointer: grad(U). Risk of memory leakage simpleFoam
  #1
New Member
 
Alberto
Join Date: Jun 2024
Posts: 5
Rep Power: 2
Gyros is on a distinguished road
Hello everyone!

I'm new to OpenFOAM. I'm trying to calculate the gradient of the velocity in a simulation using simpleFoam with the command
Code:
postProcess -func "grad(U)"
, but I get the error message "Failed to store pointer: grad(U). Risk of memory leakage". I tried using
Code:
simpleFoam -postProcess -func "grad(U)"
or adding the line
Code:
functions
{
  #includeFunc grad(U)
}
to my controlDict, but I got the same error message. The same postprocessing command works if I switch to icoFoam. Searching online, I found that this might be a bug https://develop.openfoam.com/Develop.../-/issues/2735. Do you know how I can circumvent this problem? Are there other ways to calculate the gradient of the velocity in postprocessing? Thanks a lot. I'm using OpenFOAM version 2312.
Gyros is offline   Reply With Quote

Old   July 22, 2024, 17:55
Default
  #2
New Member
 
Nafiz Ahmed Khan
Join Date: Nov 2023
Location: Canada
Posts: 27
Rep Power: 3
Nafiz375 is on a distinguished road
Hello Gyros,
Did you solve this issue?
I'm also facing a similar problem.
Nafiz375 is offline   Reply With Quote

Old   July 23, 2024, 02:17
Default
  #3
New Member
 
Alberto
Join Date: Jun 2024
Posts: 5
Rep Power: 2
Gyros is on a distinguished road
Quote:
Originally Posted by Nafiz375 View Post
Hello Gyros,
Did you solve this issue?
I'm also facing a similar problem.
Hello Nafiz375.
I didn't solve this problem, but I circumvented it by calculating the velocity gradient in my program using the code
Code:
volTensorField gradU = fvc::grad(U);
It is not calculated in postProcessing, but this approach solved the problem for me. I needed gradU as input for another file, so instead of using gradU directly, I used U as input and calculated gradU in the new file.
I hope this helps.
Nafiz375 likes this.
Gyros is offline   Reply With Quote

Old   July 23, 2024, 12:17
Default
  #4
New Member
 
Nafiz Ahmed Khan
Join Date: Nov 2023
Location: Canada
Posts: 27
Rep Power: 3
Nafiz375 is on a distinguished road
Hello Gyros, thanks for your reply.

The above problem was solved. I just deleted some lines from system/fvSolution:
Code:
cache
{
    grad(U);
}
Best
Nafiz
Gyros likes this.

Last edited by Nafiz375; July 23, 2024 at 18:01.
Nafiz375 is offline   Reply With Quote

Reply

Tags
bug, grad u, memory leakage, postprocessing, simplefoam


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
General recommendations for CFD hardware [WIP] flotus1 Hardware 19 June 23, 2024 19:02
Error with getting grad(U) at wall - failed to store pointer quarkz OpenFOAM Post-Processing 2 May 8, 2023 12:27
Workstation Suggestions For A Newbie mrtcnsmgr Hardware 1 February 22, 2023 02:13
CPU for Flow3d mik_urb Hardware 4 December 4, 2022 23:06
solver-dev : which variables to store in memory and which to compute on the fly? aerosayan Main CFD Forum 16 November 23, 2020 19:24


All times are GMT -4. The time now is 11:43.