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

How to include parameters in setSet

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 6, 2012, 10:37
Default How to include parameters in setSet
  #1
New Member
 
BT
Join Date: Jan 2011
Posts: 16
Rep Power: 15
MasterCooler is on a distinguished road
Dear all,

I am looking for a way to include parameters while setSet is running.

I execute the following command:
Code:
setSet -batch setSetDict
whereby the setSetDict file contains:
Code:
#include "../_globaleParameter/globPars" 
cellZoneSet rotor new cylinderToCell (-1 0 1) (1 0 -1) $dRot
and the globPars file contains
Code:
#inputMode merge
dRot   70;
I got the following error message:
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.x_20120105                        |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.1.x_20120105-eb976ba31c36
Exec   : setSet -batch system/setSetDict
Date   : Feb 06 2012
Time   : 16:19:29
Host   : ""
PID    : 30371
Case   : 
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:3458273  faces:10683541  points:3791497  patches:5  bb:(-300 -225 -120) (900 225 225)

Time = 0
    mesh not changed.
Reading commands from file "system/setSetDict"
Please type 'help', 'quit' or a set command after prompt.
Doing:"#include \"../_globaleParameter/globPars\""
Doing:"cellZoneSet rotor new cylinderToCell (-1 0 1) (1 0 -1) $dRot"
    Set:rotor  Size:0  Action:new
wrong token type - expected Scalar, found on line 0 the word '$dRot'

    Usage: cylinderToCell (p1X p1Y p1Z) (p2X p2Y p2Z) radius

    Select all cells with cell centre within bounding cylinder


End
In earlier versions the command cellSet (or faceSet) was used and it was never a problem to include parameters in cellSetDicts. Has anybody a solutions for that problem?

Thanks in advance.

Cheers
Ben
MasterCooler is offline   Reply With Quote

Old   February 6, 2012, 17:06
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Ben,

setSet works as a batch/script application, that is why you can't #include stuff in each batch file.
The closest application that now exists with similar functionality is topoSet.

If you still want to use setSet, then you'll need a middle step and change the way you define the values. For example:
  1. In "globPars":
    Code:
    dRot=70
  2. The file "setSetDict" you have is renamed to "setSetDict.template".
  3. In a shell script named "setIt.sh", have something like this:
    Code:
    #!/bin/sh
    source globPars
    rm setSetDict
    cat "setSetDict.template" | while read line; do
      eval echo $line >> setSetDict
    done
    setSet -batch setSetDict
    I haven't tested this, but it should work.
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 7, 2012, 06:23
Default
  #3
New Member
 
BT
Join Date: Jan 2011
Posts: 16
Rep Power: 15
MasterCooler is on a distinguished road
Hey Bruno,

thanks a lot, topoSet is exactly that what I looked for. Forget setSet ;-)

Cheers
Ben
MasterCooler is offline   Reply With Quote

Reply


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
OpenFoam install script Error during paraFoam installation SePe OpenFOAM Installation 10 June 19, 2010 15:15
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 13:43
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 07:21
OpenFOAM15 paraFoam bug koen OpenFOAM Bugs 19 June 30, 2009 10:46


All times are GMT -4. The time now is 17:05.