CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM

refineWallLayer cellZone preservation workaround

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   May 10, 2016, 10:56
Default refineWallLayer cellZone preservation workaround
james wilson
Join Date: Aug 2014
Location: Orlando, Fl
Posts: 38
Rep Power: 11
jameswilson620 is on a distinguished road

I am using a solver derived from porousInterFoam and would like to refine the lower wall cells with refineWallLayer in a shell script:
echo "Executing resetFields: copying .org files"

cp 0/ 0/alpha.water
cp 0/ 0/T
cp 0/ 0/porosity

rm ./processor*


refineWallLayer -overwrite lowerWall 0.5 //this splits cells in zone "porous" and subsequently removes them from porous

#faceSet f0 new patchToFace lowerWall 
#cellSet c0 new faceToCell f0 any
#cellZoneSet porous  setToCellZone c0

the command: refineWallLayer, removes the newly created cells from their parent cell zone, in this case, zone "porous".

This is a bug resolved here: but I am using stock OF2.3.0.

Since i am using OF2.3.0, I would like to find a suitable work around to add the cells back to the cell zone "porous". You'll find, in the code snippet above, an excerpt from a shell script I use in my case file (attached here). I have attempted to use setSet to add the new cells adjacent to "lowerWall" back to cell zone "porous". This leads me to three questions for the forum:

1. When operating on the command line using setSet and the commented commands found in the shell script above, why aren't the cells adjacent to lowerWall added to cell zone "porous"? Another note, when executing the commands in the terminal, I receive no errors. Heres the output:

uname@uname270:~/SOME/PRIVATE/PATH/case1$ setSet 
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:                      |
|    \\/     M anipulation  |                                                 |
Build  : 2.3.0-f5222ca19ce6
Exec   : setSet
Date   : May 10 2016
Time   : 10:35:30
Host   : "uname270"
PID    : 18503
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time:0  cells:16000  faces:64281  points:32564  patches:5  bb:(0 0 0) (0.3 0.3 0.01)
	porous	size:4000
	freeFlowBlock1	size:4000
	freeFlowBlock2	size:3000
	freeFlowBlock3	size:4000
	inletBlock	size:900

Time = 0
    mesh not changed.
Please type 'help', 'quit' or a set command after prompt.
readline>faceSet f0 new patchToFace lowerWall 
    Set:f0  Size:0  Action:new
    Adding all faces of patch lowerWall ...
    Found matching patch lowerWall with 100 faces.
    Writing f0 (size 100) to "constant/polyMesh/sets/f0" and to vtk file "VTK/f0/f0_0.vtk"

readline>cellSet c0 new faceToCell f0 any
    Set:c0  Size:0  Action:new
    Adding cells according to faceSet f0 ...
    Writing c0 (size 100) to "constant/polyMesh/sets/c0" and to vtk file "VTK/c0/c0_0.vtk"

readline>cellZoneSet porous  setToCellZone c0
2. is there a way to automate these commands in a shell script? perhaps as a series of commands in controlDict? These commands, as they are presented without #comment, produce an error when used in a shell script as setSet seems to be an interactive utility when provoked. The solution to this problem is relevant to OF but likely deals more with the computer science aspects of interacting with linux. My apologies for this one.

3. Is there another, more effective solution to this problem while using OF2.3.0?

Thanks for looking into this thread, James
Attached Files
File Type: gz case1CFDForumSubmission.tar.gz (9.7 KB, 2 views)
jameswilson620 is offline   Reply With Quote


cellzone, refinewalllayer, setset

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 05:38
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 09:42
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
OF-2.2.x: Derived class from cellZone and "undefined symbol error" A_Pete OpenFOAM Programming & Development 6 April 28, 2014 01:53

All times are GMT -4. The time now is 14:02.