View Issue Details

IDProjectCategoryView StatusLast Update
0003907OpenFOAMBugpublic2022-10-13 11:34
Reportermichael.mueller-wrd Assigned Towill  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformUnixOScentOSOS Version(please specify)
Product Versiondev 
Fixed in Versiondev 
Summary0003907: functions for runtime visualization give output in wrong postProcessing directory for multi-region cases
DescriptionFor multi-region cases, functions defined in controlDict give output usually in directory: ./postProcessing/<region>/<funcName>/<time>/...*.dat
For visualization like "surfaces", however, output is written at: ./postProcessing/<funcName>/<region>/<time>/...*.vtk

Would be helpful and more clear to have that aligned and vtk output written to:
./postProcessing/<region>/<funcName>/<time>/...*.vtk
Steps To ReproduceFor example "heatExchanger" tutorial case: add functions to controlDict, e.g.
functions
{
    #includeFunc residuals(region = air, p_rgh, U, h)
    #includeFunc cuts(funcName=cuts_air, region = air, writeControl = writeTime)
}

add file system/cuts, e.g.
fields ( U T );
interpolate true;
type surfaces;
libs ( "libsampling.so" );
writeControl writeTime;
surfaceFormat vtk;
interpolationScheme cellPoint;
surfaces
(
cut_x { type cuttingPlane ; planeType pointAndNormal ; point ( 0.25 0.025 0.25 ) ; normal ( 1 0 0 ); interpolate true; }
cut_y { type cuttingPlane ; planeType pointAndNormal ; point ( 0.25 0.025 0.25 ) ; normal ( 0 1 0 ); interpolate true; }
cut_z { type cuttingPlane ; planeType pointAndNormal ; point ( 0.25 0.025 0.25 ) ; normal ( 0 0 1 ); interpolate true; }
);

residual output in:
postProcessing/air/residuals(region=air,p_rgh,U,h)/0/residuals.dat
vtk files in:
postProcessing/cuts_air/air/0/cut_*.vtk
postProcessing/cuts_air/air/50/cut_*.vtk
...
TagsNo tags attached.

Activities

henry

2022-10-12 21:33

manager   ~0012799

We could make this change but it would take a bit of time and would not be backward-compatible with previous version or with user scripts relying on the current structure, however consistency is always good.

michael.mueller-wrd

2022-10-13 08:49

reporter   ~0012802

My vote would go to consistency over backward-compatibility with user scripts.

will

2022-10-13 11:34

manager   ~0012803

Last edited: 2022-10-13 11:34

I think on balance, we agree. Consistency is more important in this instance. User scripts can/should be easily modified.

Resolved in dev by the following commit:

https://github.com/OpenFOAM/OpenFOAM-dev/commit/5b11f5a833e927aeb26a5f9adaf3931f58ca3c94

Now the region name always comes first, followed by the function name.

Issue History

Date Modified Username Field Change
2022-10-12 20:30 michael.mueller-wrd New Issue
2022-10-12 21:33 henry Note Added: 0012799
2022-10-13 08:49 michael.mueller-wrd Note Added: 0012802
2022-10-13 11:34 will Assigned To => will
2022-10-13 11:34 will Status new => resolved
2022-10-13 11:34 will Resolution open => fixed
2022-10-13 11:34 will Fixed in Version => dev
2022-10-13 11:34 will Note Added: 0012803
2022-10-13 11:34 will Note Edited: 0012803