|
[Sponsors] |
Problem with sampling in a specific zone in parallel |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 9, 2021, 13:10 |
Problem with sampling in a specific zone in parallel
|
#1 |
New Member
Junming Duan
Join Date: Sep 2021
Posts: 1
Rep Power: 0 |
Dear all,
I'm doing a simulation of flow past a rotating 2D cylinder with OpenFOAM-v2006. The center of the cylinder is at (0,0), and the whole domain is (-0.6, 0.8) \times (-0.6, 0.6). I want to extract the cell center pressure in a small part around the cylinder by using topoSet and sampling. Here is the code Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2006 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application pimpleFoam; ...... functions { Sampling_rec { type surfaces; libs ("libsampling.so"); interpolationScheme cellPointFace; surfaceFormat raw; fields (p); surfaces { rec { type plane; zone rec_extract; planeType pointAndNormal; pointAndNormalDict { point (0 0 -0.24725); normal (0 0 1); } interpolate true; triangulate false; } } timeStart 0; timeEnd 10; executeControl writeTime; executeInterval 1; writeControl writeTime; writeInterval 1; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2006 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object topoSetDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // actions ( { name rec_extract; type cellSet; action new; source boxToCell; box (-0.1 -0.2 -0.25) (0.1 0.2 -0.24); } { name rec_extract; type cellZoneSet; action new; source setToCellZone; set rec_extract; } ); // ************************************************************************* // Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create polyMesh for time = 0 Reading topoSetDict Time = 0 mesh not changed. Created cellSet rec_extract Applying source boxToCell Adding cells with centre within boxes 1((-0.1 -0.2 -0.25) (0.1 0.2 -0.24)) cellSet rec_extract now size 14320 Created cellZoneSet rec_extract Applying source setToCellZone Adding all cells from cellSet rec_extract ... cellZoneSet rec_extract now size 14320 End Also if I reconstruct the solution first, I can get correct file under postProcessing/Sampling_rec/0.001, postProcessing/Sampling_rec/0.002 ... But if I run "mpirun -n 36 pimpleFoam -postProcess", the files "p_rec.raw" under postProcessing/Sampling_rec/0.001, postProcessing/Sampling_rec/0.002 ... will have 22395 points. It's much larger than the region I want, and it's also not the whole domain. Do you have any idea why sampling a specific zone doesn't work in parallel? Or something I missed? Thank you in advance! |
|
January 6, 2022, 15:00 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
Perhaps you missed the -parallel option?
Your command should probably look like: Code:
mpirun -n 36 pimpleFoam -postProcess -parallel |
|
Tags |
parallel, sampling |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem in parallel processing [Process affinity not being set] | Roh | FLUENT | 4 | October 26, 2023 04:42 |
SU2-7.0.1 on ubuntu 18.04 | hyunko | SU2 Installation | 7 | March 16, 2020 05:37 |
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem | Attesz | OpenFOAM Meshing & Mesh Conversion | 12 | May 2, 2013 11:52 |
[ICEM] Export ICEM mesh to Gambit / Fluent | romekr | ANSYS Meshing & Geometry | 1 | November 26, 2011 13:11 |
Fluent incident radiation problem | Michael Schwarz | Main CFD Forum | 0 | October 21, 1999 06:56 |