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

Problem with sampleDict utility

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 15, 2021, 03:58
Default Problem with sampleDict utility
  #1
New Member
 
Fab
Join Date: Apr 2019
Posts: 27
Rep Power: 7
Rotidpor is on a distinguished road
Hello everyone,


I am trying to sample surface scalar fields at a wall boundary. For this I'm using this sampleDict and :

buoyantSimpleFoam -postProcess -func sampleDict -latestTime


type surfaces;
libs ("libsampling.so");

setFormat raw;

surfaceFormat foam;

interpolationScheme cellPoint;

fields
(
T
mag_grad_O
);

sets
(
);

surfaces
(

w_cave
{
type patch;
patches ( w_cave );
triangulate false;
interpolate false;
}

);



It works fine for the usual "official" fields like T and U for example but I can't get it to work for custom fields. I'm just calculating the magnitude of the gradient of a passive scalar at this wall boundary.
Has someone an explanation ? The field I'm calculating is just a surface scalar field exactly like the temperature but I get this error message :

--> FOAM Warning :
From void Foam::sampledSurfaces::countFields()
in file sampledSurface/sampledSurfaces/sampledSurfaces.C at line 138

Cannot find registered field matching 1(mag_grad_O)


Well, I understand that it only works for the fields written by default with each solver but why is this ?? The last thing I want to do is using laplacianFoam -postProcess -func sampleDict (this solver writes by default the gradient of the variable) because it would force me to change the name of my field and calculate the magnitude myself... Which would not be efficient.

Rotidpor is offline   Reply With Quote

Old   December 15, 2021, 05:07
Default
  #2
New Member
 
Fab
Join Date: Apr 2019
Posts: 27
Rep Power: 7
Rotidpor is on a distinguished road
I have found a way...


Just change the name of the field file to "k" for instance or any default written field of the solver, change the dimensions and it magically works.
But I feel guilty for fooling openfoam like that and I still don't get why it just doesn't simply work...
Rotidpor 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
Problem in compiling the makeAxialMesh utility Belmar OpenFOAM Programming & Development 1 July 18, 2017 15:17
wallHeatFlux Calculation wrt utility version ahmet OpenFOAM Post-Processing 1 December 18, 2016 19:45
Heat Transfert, mixing problem Wazdq CFX 8 November 7, 2016 05:44
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13


All times are GMT -4. The time now is 00:35.