Contrib/funkySetFields

From OpenFOAMWiki
< Contrib
Revision as of 17:16, 28 August 2007 by AtsKvh (Talk | contribs)

produzione abbigliamento rom dayse brucieri onkyo sr502e elena anaya libri green day gioiellerie vercelli vaio sony s4xp rose fiore viaggio damore punto grande cla 5 olympus enermax cs 721 sakas samsung sm793df prait vamp bmw 520 i luoghi di scambio polysilicon birkin deixa entrat bennato uncino tettte cartoon-networ donne mature in cerca ragazzi travan tr5 registratore digitale creative fica spanata ricevitore gps tom telecom cordless voice kokkola brian adams summer 69 il maialino di kenneth bigley micro hi fi canon ef 70-200mm f 4l usm teac mp 200 256 mb ditta fantozzi manche, la- yamaha sintoamplificatore casse nero golf iii itinerario moto drim rex r 70 a noi no racconti amatoriali lg dvd-r rw r rw gsa-4163b xxxmature ram notebook fujitsu esibizioniste donne nude in pubblico policastro gloomy sunday mp3 lisa e il diavolo film dvd lcd 42 hdmi schermo 42 pollici musica new age stilo per qtek audiokey fm 1 gb maschi foto team maasin mercedes e 320 sw modem bluethoot trust pioneer dv 380-s pappa con il pomodoro che giuseppe verdi. due foscari iraq head garmin - forerunner 301 foto di fiche monnalisa maddalena crippa la rosa blu acer hd esterno 80gb titoli esami di oggi kit home cinema harman kardon giochi in generale fish hungry classifica single noleggio vettura lotto programma dialogo sulla nobilta moto dkw home theatre kenwood 3 1 diritto penitenziario pc workstation delta gps best of santana zou zou gruppi sociali einstellung perazzolo giorgio cock max luce elisa pussy lover nikon f-100 italia umbria vacanze preventivi assicurativi nano franchising abbronzatura xd picture card olympus 512 mb epson photopc l-300 shirakaba pen drive mp3 1gb fantasy girl toto live abit uguru nforce2 calendario ragazze del web sologay benny benassy illusion inspire gd580 5 1 caminetto accessorio mp3 player nortek roselyn sanchez alticini mario winon sapphire radeon 9600 xt 128 vacation homes audi a3 1.6 lettore mp3 registratore 1gb masterizzatore usb slim hard disk lacie 300 e maze freek casa de dora rino gaetano midi stampante hp designjet 30 tempurpedic mattress la bestia nello spazio seconda prova d esame di maturita paola e chiara cantanti successi italiani estate 2004 marna, alta- matty amd a8n-e usb ethernet lazlo piattaforma trading on line foto spiagge nudismo panasonic - th-42pa50e supporto per tv ciatti affinita nomi specialista tempi e metodi (regione lombardia - milano provincia) moms granny business web site hosting alimenti contenenti alluminio jeans dolce gabbana donna abbigliamento rex lavabiancheria foto fanni cadeo simme napule scandalo gf fattisentire log d attivazione www pedagogia it natale ungaretti guadalupe ferro termozeta fragolina sevillana televisori plasma scheda video ati 9800 xt kiss the rain di billie myers acer n35 accessori barbra streisand memory assicurazione dublino tenda esterno radiografie scanner macchina cucito testo the o c decoder modulatore terra samba ragazzo trieste marano rapido y furioso mardy grass medleys il contadino allegro prince of persia 2 trailer 5 gustavo grande fratello le avventure di garfild clipart cobra wanadootv com tc-dc58 canon quisiera ser chayanne autocad libri copertina dragostea compilation playa de las americas truth is clip blue land dead moto aermacchi gaf control australia sony - dcr hc17e spanish speaking countrys rat buster hull, albert wallace elevator ariante tower giochi totalmente gratuiti toples dobry dj 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