Contrib/funkySetFields

From OpenFOAMWiki
< Contrib
Revision as of 14:02, 2 October 2007 by Yo8Tne (Talk | contribs)

bbw adidas country zip pietra ligure ospedale lbp 2900 pet shop discography gh j vacanza viaggi teddybears sthlm hey boy porta scomparsa h2o condizionatore xuanhua km0 volvo diesel auto km 0 zukova lettore cd e dvd indesit wie107 fedine elettrosaldatura coop aperta in modena e reggio emilia barra ottone rie rasmussen radiatori ad olio porno donne vecchie noosa holiday accommodation mascherina bagutti schede video 4x tonghua fotos desnu tv usb schede acquisizione e tv fortalesa danni minogue glassa al cacao rossella brescia calendario 2004 asus eax700pro il tesoro maya pantaloni di roberto cavalli guasti c3 farsetti arte testi ozone telefoni cellulari motorola thermaltake liquid cooling valle ossola agriturismo biologico batterie ixus 30 nb 4l er cipolla suoneria gratis foto garatis gay gioco del tiro a volo modem pcmcia gprs battle mages produzione sedie tre metri sopra i excite video gioco vampiro casse acustiche energy sally vasco samsung sgh z500 giggidalessio software cud orario voli bologna nudegirls aix en provence ristorante my last dayz pozzillo yaesu vx gta vice siti navigatore satellitare tomtom go mutuo tasso zero finanziaria 2003 tomtom 3 ballando vecchie troie nude mysql 3.23.57 sergiorossi lettori mp3 usb sd veronica 2 foto di valentino rossi adsl router zyxel modem persone coinvolte nella droga scottsdale ristorante iosue gyro ball samsung televisore plasma prisionera de pilar montenegro socket 479 manga porno sailor moon i figli di bruce lee noleggio lungo termine smart router adsl michelangelo home 54 she we be loved helloween dvd il signor hood ando rebuleando hot burn il gioco dellamore a walk in the clouds matia bazar mp3 mar w a info bernasconi it babylon zoo siracusa hotel mam me la tranca scanner alimentatore canzone tedesca geforce 6800 gt 256mb nec 341i pink charlie s angels sermonti fraks adventure champions leaugue aurora frazione sossana jeans plus video michell vieth rda vs oxi una rosa poggiatesta per auto concorso superenalotto western digital 120 gb lettore mpeg florin salam daniel acer - ram 512mb ddr-333 aspire 1510 i colori della vittoria bmw r 1200 c moto marble logitech sister sex irda lg u8110 freddie the frog foto gratis di maschi nudi celia cruz - e fania all stars. in africa cover convivendo biagio antonacci souza, robert de- driver 3 voli low cost austria calendari 2004 przezyj to sam esercizio ginnastica vari download usbehci sys johnlennon sony dcr- dvd403 w la pappa col pomodoro tre allegri compari vivavoce motorola v3 notebook hp nx ricetta san valentino navigatore satellitare portatile epson color 1500 www google co yu t.rex. special edition ep interfaccia umts henghel vendita casa colonica senigallia alain cuny profumi light blue mar adentro luz casal basset, joan manuali giochi ps2 gichi di macchine rare interpol agente z 3 accordi di senza parole vasco rossi www striptiz com non solo hollywood thermo autochrome la casa abbandonata il principe di belair dieta pasta seca2 upload colours domino nikonos v brillante machhine moto honda pasion de gavilanes sobre fuego problemi nissan micra germania hotel pc2100 512mb toyota auto nuove celia cruz midi t o k www auchan it gps geosat 4 travel xerox c 440 www britney spears it le parole della canzone fuck it www vidatv com hp deskjet 6540 cartuccia l inventore di sogni monte castello bedshaped lg rz 20 pipa per tabacco yattaman. vol. 06 guarire con la visualizzazione fiat 1100 8v moana pozzi it firenze sia casa albo avvocati lazio eminem e d12 chat taranto antenna tv vendita thanh para (gomma) topfield 5000 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