|
[Sponsors] |
July 9, 2014, 16:30 |
Possible createPatch/createBaffles bug?
|
#1 |
Member
Simon Arne
Join Date: May 2012
Posts: 42
Rep Power: 14 |
Hi,
I create 2 cyclic patches using createPatch. Unluckily the patchField ability does not work as intended. The workflow: 1) Create 2 patches with snappyHexMesh baffle functionality: Code:
vent_in_fs_0 { level (3 6); faceZone vent_in_fs_0; // Create baffles for all faces on the surface faceType baffle; patchInfo { type patch; } } 2) Convert the 2 baffle faces to cyclics using createPatch: Code:
{ // Name of new patch name vent_in_fs_0_cyclic; // Dictionary to construct new patch from patchInfo { type cyclic; neighbourPatch vent_in_fs_0_slave_cyclic; patchFields { p { type fan; patchType cyclic; jump uniform 0; value uniform 0; jumpTable polynomial 1((100000000 0)); } } } // How to construct: either from 'patches' or 'set' constructFrom patches; // If constructFrom = patches : names of patches. Wildcards allowed. patches (vent_in_fs_0); } { // Name of new patch name vent_in_fs_0_slave_cyclic; // Dictionary to construct new patch from patchInfo { type cyclic; neighbourPatch vent_in_fs_0_cyclic; patchFields { p { type fan; patchType cyclic; value uniform 0; } } } Code:
cyclic : vent_in_fs_0_cyclic scalar nut cyclic scalar k cyclic scalar p cyclic scalar omega cyclic vector U cyclic cyclic : vent_in_fs_0_slave_cyclic scalar nut cyclic scalar k cyclic scalar p cyclic scalar omega cyclic vector U cyclic Snippet from constant/boundary: Code:
vent_in_fs_0_cyclic { type cyclic; inGroups 1(cyclic); nFaces 56; startFace 5644731; matchTolerance 0.0001; transform unknown; neighbourPatch vent_in_fs_0_slave_cyclic; } vent_in_fs_0_slave_cyclic { type cyclic; inGroups 1(cyclic); nFaces 56; startFace 5644787; matchTolerance 0.0001; transform unknown; neighbourPatch vent_in_fs_0_cyclic; } Why is "patchFields" not performed? I compared it to the TJunctionFan Tutorial, where patchSummary looks like this: Code:
cyclic : cyclicFaces_master scalar nut cyclic scalar k cyclic scalar nuTilda cyclic scalar p fan scalar epsilon cyclic vector U cyclic cyclic : cyclicFaces_slave scalar nut cyclic scalar k cyclic scalar nuTilda cyclic scalar p fan scalar epsilon cyclic vector U cyclic Note: In this case my cyclic patches are derived directly from the geometry via searchableSurface/STL (and the baffle creation in snappyHexMesh is commented out, so there is no name conflict etc.). Code:
baffles { cyclicFaces { //- Select faces and orientation through a searchableSurface type searchableSurface; surface searchablePlate; origin (10 -3 2); span (0 1 1); patchPairs { type cyclic; //- Optional override of added patchfields. If not specified // any added patchfields are of type calculated. patchFields { p { type fan; patchType cyclic; jump uniform 0; value uniform 0; jumpTable polynomial 1((100000000 0)); } } } } cyclicFaces1 { //- Use surface to select faces and orientation. type searchableSurface; surface triSurfaceMesh; name vent_in_fs_0.obj; //- Optional flip // flip true; // Generate patches explicitly patches { master { //- Master side patch name vent_in_fs_0; type cyclic; neighbourPatch vent_in_fs_0_slave; patchFields { type fan; patchType cyclic; jump uniform 0; value uniform 0; jumpTable polynomial 1((1000000000 0)); } } slave { //- Slave side patch name vent_in_fs_0_slave; type cyclic; neighbourPatch vent_in_fs_0; patchFields { type fan; patchType cyclic; value uniform 0; } } } } } My Allrun-Skript: Code:
#!/bin/sh cd ${0%/*} || exit 1 # run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions runApplication surfaceFeatureExtract runApplication blockMesh runApplication decomposePar runParallel snappyHexMesh 20 -overwrite runParallel createPatch 20 -overwrite #- For non-parallel running #cp -r 0.org 0 > /dev/null 2>&1 #- For parallel running ls -d processor* | xargs -i rm -rf ./{}/0 $1 ls -d processor* | xargs -i cp -r 0.org ./{}/0 $1 runParallel patchSummary 20 -expand runParallel potentialFoam 20 -noFunctionObjects -writep runParallel $(getApplication) 20 runApplication reconstructParMesh -constant runApplication reconstructPar # ----------------------------------------------------------------- end-of-file I tried to switch to serial processing and PIMPLE without sucess. In addition I changed from "fan" boundary to fixedJump and uniformJump - unluckily they are not updated neither. Thanks in advance for every help! |
|
July 9, 2014, 16:49 |
|
#2 |
Member
Simon Arne
Join Date: May 2012
Posts: 42
Rep Power: 14 |
deleted for improved reading
Last edited by simpomann; July 15, 2014 at 13:07. |
|
July 15, 2014, 08:07 |
|
#3 |
Member
Simon Arne
Join Date: May 2012
Posts: 42
Rep Power: 14 |
Update:
I resolved the problem and it was entirely my fault: The Allrun script was in wrong order! The xargs-line overwrote the decomposed patch fields. Corrected: Code:
#- For parallel running ls -d processor* | xargs -i rm -rf ./{}/0 $1 ls -d processor* | xargs -i cp -r 0.org ./{}/0 $1 runParallel createPatch 20 -overwrite Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object createBafflesDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Sample for creating baffles: // - usually converting internal faces into two boundary faces // - or converting boundary faces into a boundary face // (internalFacesOnly=false)(though should use really createPatch // to do this) // - specification in one of two modes: // - patchPairs : create two patches of same type, same input // - patches : create patches separately, full control over what // to create on what side // (this mode can also create duplicate (overlapping) // sets of baffles: // - internalFacesOnly = false // - have 4 entries in patches: // - master // - slave // - additional master // - additional slave) // Whether to convert internal faces only (so leave boundary faces intact). // This is only relevant if your face selection type can pick up boundary // faces. internalFacesOnly true; // Optionally do not read/convert/write any fields. //noFields true; // Baffles to create. baffles { vent_in_fs_0 { //- Select faces and orientation through a searchableSurface type searchableSurface; surface triSurfaceMesh; name vent_in_fs_0.obj; //- Optional flip flip true; patchPairs { type cyclic; //- Optional override of added patchfields. If not specified // any added patchfields are of type calculated. patchFields { p { type fan; patchType cyclic; jump uniform 0; value uniform 0; jumpTable polynomial 5((171.52 0) (-10.09 1) (-1.71 2) (-0.48 3) (0.03 4)); } } } .... Thread can be closed or deleted. Greetings! Simon Last edited by simpomann; July 15, 2014 at 13:04. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
dieselEngineFoam bug - OpenFOAM-1.6-ext | novakm | OpenFOAM Bugs | 1 | December 5, 2013 14:18 |
Serious bug in LES interface | fs82 | OpenFOAM Bugs | 21 | November 16, 2009 09:15 |
Bug in Meshing Parameters menu Spacing1 (1e+10) | Karna | ANSYS Meshing & Geometry | 1 | October 12, 2009 15:38 |
Bug reports | Mattijs Janssens (Mattijs) | OpenFOAM | 0 | January 10, 2005 11:05 |
Forum y2k Bug | Jonas Larsson | Main CFD Forum | 1 | January 5, 2000 11:22 |