Contrib/funkySetFields

From OpenFOAMWiki
< Contrib
Revision as of 20:10, 10 July 2007 by AtsKvh (Talk | contribs)

qwest ringtones levitra online diethylpropion online cheap propecia zanaflex online cool ringtones paxil online free sprint ringtones free ringtones flexeril lortab online samsung ringtones free sonyericsson ringtones cyclobenzaprine online punk ringtones free qwest ringtones vicodin online free qwest ringtones free kyocera ringtones cyclobenzaprine online free jazz ringtones clomid online cheap xanax tracfone ringtones flexeril free midi ringtones but ultram free sony ericsson ringtones free wwe ringtones real ringtones nokia ringtones free punk ringtones free funny ringtones free cool ringtones funny ringtones didrex online paxil online online lorazepam free mtv ringtones buy alprazolam cheap pharmacy online free sony ringtones free ringtones cheap vigrx free polyphonic ringtones mp3 ringtones free polyphonic ringtones free polyphonic ringtones order tramadol adipex online but ultracet cheap viagra buy diazepam cheap zoloft cheap vigrx cheap lisinopril cheap pharmacy online celexa online sprint ringtones cheap clonazepam levitra sildenafil cheap vicodin xanax cheap valium cheap pharmacy online sildenafil online wellbutrin online adipex online order vicodin free wwe ringtones alltel ringtones verizon ringtones free midi ringtones prozac online lipitor free sony ericsson ringtones sony ringtones albuterol online viagra online carisoprodol online sony ericsson ringtones propecia online nexium online lorazepam online flexeril online free tracfone ringtones clomid online order paxil free motorola ringtones zyban online qwest ringtones nextel ringtones cheap clonazepam free music ringtones tramadol online cheap soma buy cyclobenzaprine tramadol online ativan online adipex online nexium online clonazepam online hgh online cheap tenuate zoloft free midi ringtones alprazolam online cheap ambien free sony ericsson ringtones cheap lisinopril midi ringtones carisoprodol online nokia ringtones free funny ringtones didrex online buy hgh didrex online free sony ringtones cheap ultram hgh online ericsson ringtones fioricet cialis flexeril online carisoprodol online real ringtones cheap hoodia but ambien cheap lipitor online pharmacy free ringtones zanaflex online phentermine online diethylpropion online soma online free sprint ringtones diazepam online free sharp ringtones hydrocodone online adipex xanax online clomid online free tracfone ringtones free sharp ringtones lisinopril online wellbutrin online kyocera ringtones motorola ringtones phentermine online buy zoloft carisoprodol online alprazolam online cheap diethylpropion free nokia ringtones albuterol online free funny ringtones valium online buy tramadol fioricet online cheap viagra samsung ringtones mtv ringtones cheap norco free music ringtones buy ativan cheap tenuate lipitor online free ericsson ringtones soma online ambien online order rivotril cialis buy tramadol ericsson ringtones free mtv ringtones propecia online free jazz ringtones free kyocera ringtones cheap viagra but norco free alltel ringtones buy zanaflex motorola ringtones cheap viagra lortab online music ringtones free mp3 ringtones buy albuterol buy clonazepam order ambien xenical online free real ringtones nexium online wellbutrin online sonyericsson ringtones cheap celexa diazepam online free nextel ringtones soma online Valid versions: OF version 13.png OF version 14.png


1 Short description

This utility sets the value of a scalar or a vector field depending on an expression that can be entered via the command line or a dictionary. It can also be used to set the value of fields on selected patches. It's like the setFields-utility on steroids.

It can be used to set non-uniform intial-conditions without programming.

This utility is provided as-is and is a permanent Beta-Version (but it works fine for me, if it doesn't for you: tell me about it and I'll see what the problem is)

1.1 Words of warning

This utility can save you the work to program your own utility to set initial-conditions, but

  • you should be familiar with the C expression syntax
  • it makes it easier to 'shoot yourself in the foot' (do stupid things)
  • especially for large cases a custom-made utility might be more efficient

(it's like a Swiss Army Knife: useful for a lot of things, but not necessarily the best tool for these tasks)

2 Pre-requisites

To compile this utility at least version 2.1 of Bison has to be installed. Check with

bison -V

on the command line before trying to compile it.

2.1 For those who don't have bison 2.1

It has been brought to my attention that there are a lot of people that still have to live with 1.x bisons. For those there is a script provided that inserts the generated sources. Just go to the source directory and call

./insertGenerated.sh

It copies the generated files to the directory and modifies Make/files

3 Usage

The utility can be used from the command line or with a dictionary. In both forms an option -time is needed to select the time step.

3.1 Basic ommand line usage

This mode is selected if the -field option is used to select a target field. If the target doesn't yet exist the option -create has to be added.

In addition an option -expression is needed with the expression that is to be written to the target field (Syntax see below).

An optional option is -condition: only cells for which this expression evaluates to true are overwritten with the expression. For all other cells the old value is kept.

expression and condition should be enclosed in quotes to keep the shell from interpreting special characters.

An example of the usage would be:

funkySetFields . cavity -field U -expression '(grad(dist())^vector(0,0,-1))*mag(pos()-vector(0.05,0.05,0))/0.05'  -time 0 

This sets the velocity field to a 'circle' around the center. In the most simple case the velocity field can be set to zero

funkySetFields . cavity -field U -expression 'vector(0,0,0)' -time 0

Same for the pressure field:

funkySetFields . cavity -field p -expression '0' -time 0

The damBreak-tutorial could be initialized with

funkySetFields . damBreak -time 0 -field gamma -expression " pos().x <= 0.1461