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

refineWallLayer cellZone preservation workaround

Register Blogs Community New Posts Updated Threads Search

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

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

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

rm ./processor*

blockMesh

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

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

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

This is a bug resolved here: http://bugs.openfoam.org/view.php?id=1524 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:

Code:
uname@uname270:~/SOME/PRIVATE/PATH/case1$ setSet 
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.0-f5222ca19ce6
Exec   : setSet
Date   : May 10 2016
Time   : 10:35:30
Host   : "uname270"
PID    : 18503
Case   : /SOME/PRIVATE/PATH
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)
cellZones:
	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
readline>^C
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, 3 views)
jameswilson620 is offline   Reply With Quote

Reply

Tags
cellzone, refinewalllayer, setset


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 06:38
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 10:42
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
OF-2.2.x: Derived class from cellZone and "undefined symbol error" A_Pete OpenFOAM Programming & Development 6 April 28, 2014 02:53


All times are GMT -4. The time now is 20:44.