Difference between revisions of "Contrib/funkySetFields"

From OpenFOAMWiki
m (Removing Spam)
m
Line 1: Line 1:
{{VersionInfo}}{{Version1.3}}{{Version1.4}}
+
[http://soler.net.cn/data/produzione-abbigliamento.htm produzione abbigliamento rom] [http://joperan.org/data/dayse-brucieri/ dayse brucieri] [http://polex.com.cn/resources/articles/onkyo-sre.htm onkyo sr502e] [http://joperan.org/data/elena-anaya/ elena anaya] [http://xionny.cn/topic/libri-green/ libri green day] [http://budget7i.info/lib/gioiellerie-vercelli/ gioiellerie vercelli] [http://joperan.org/data/vaio-sony/ vaio sony s4xp] [http://funkall.us/images/small/rose-fiore/ rose fiore] [http://budget7i.info/lib/viaggio-damore/ viaggio damore] [http://sneck.info/data/punto-grande/ punto grande] [http://xionny.cn/topic/cla-/ cla 5 olympus] [http://budget7i.info/lib/enermax-cs/ enermax cs 721] [http://xionny.cn/topic/sakas/ sakas] [http://manoke.cn/topic/samsung-smdf/ samsung sm793df] [http://xionny.cn/topic/prait/ prait] [http://primonona.info/content/view/vamp/ vamp] [http://klohy.info/img/styles/bmw-.htm bmw 520 i] [http://soler.net.cn/data/luoghi-di.htm luoghi di scambio] [http://xionny.cn/topic/polysilicon/ polysilicon] [http://budget7i.info/lib/birkin/ birkin] [http://wedner.info/content/view/deixa-entrat.htm deixa entrat] [http://primonona.info/content/view/bennato-uncino/ bennato uncino] [http://funkall.us/images/small/tettte/ tettte] [http://joperan.org/data/cartoonnetwor/ cartoon-networ] [http://funkall.us/images/small/donne-mature/ donne mature in cerca ragazzi] [http://joperan.org/data/travan-tr/ travan tr5] [http://klohy.info/img/styles/registratore-digitale.htm registratore digitale creative] [http://soler.net.cn/data/fica-spanata.htm fica spanata] [http://joperan.org/data/ricevitore-gps/ ricevitore gps tom] [http://xionny.cn/topic/telecom-cordless/ telecom cordless voice] [http://manoke.cn/topic/kokkola/ kokkola] [http://polex.com.cn/resources/articles/brian-adams.htm brian adams summer 69] [http://budget7i.info/lib/il-maialino/ il maialino] [http://veggis.org.cn/resources/articles/di-kenneth.htm di kenneth bigley] [http://polex.com.cn/resources/articles/micro-hi.htm micro hi fi] [http://budget7i.info/lib/canon-ef/ canon ef 70-200mm f 4l usm] [http://xionny.cn/topic/teac-mp/ teac mp 200 256 mb] [http://joperan.org/data/ditta-fantozzi/ ditta fantozzi] [http://polex.com.cn/resources/articles/manche-la.htm manche, la-] [http://wedner.info/content/view/yamaha-sintoamplificatore.htm yamaha sintoamplificatore casse] [http://svike.info/view/new/nero-golf.htm nero golf iii] [http://sneck.info/data/itinerario-moto/ itinerario moto] [http://klohy.info/img/styles/drim.htm drim] [http://xionny.cn/topic/rex-r/ rex r 70 a] [http://manoke.cn/topic/noi-no/ noi no] [http://budget7i.info/lib/racconti-amatoriali/ racconti amatoriali] [http://funkall.us/images/small/lg-dvdr/ lg dvd-r rw r rw gsa-4163b] [http://klohy.info/img/styles/xxxmature.htm xxxmature] [http://manoke.cn/topic/ram-notebook/ ram notebook fujitsu] [http://budget7i.info/lib/esibizioniste-donne/ esibizioniste donne nude in pubblico] [http://veggis.org.cn/resources/articles/policastro.htm policastro] [http://sneck.info/data/gloomy-sunday/ gloomy sunday mp3] [http://klohy.info/img/styles/lisa-e.htm lisa e il diavolo film dvd] [http://xionny.cn/topic/lcd-/ lcd 42 hdmi] [http://xionny.cn/topic/schermo-/ schermo 42 pollici] [http://veggis.org.cn/resources/articles/musica-new.htm musica new age] [http://budget7i.info/lib/stilo-per/ stilo per qtek] [http://joperan.org/data/audiokey-fm/ audiokey fm 1 gb] [http://svike.info/view/new/maschi-foto.htm maschi foto] [http://funkall.us/images/small/team/ team] [http://svike.info/view/new/maasin.htm maasin] [http://manoke.cn/topic/mercedes-e/ mercedes e 320 sw] [http://manoke.cn/topic/modem-bluethoot/ modem bluethoot trust] [http://manoke.cn/topic/pioneer-dv/ pioneer dv 380-s] [http://wedner.info/content/view/pappa-con.htm pappa con il pomodoro] [http://joperan.org/data/che/ che] [http://polex.com.cn/resources/articles/giuseppe-verdi.htm giuseppe verdi. due foscari] [http://svike.info/view/new/iraq-head.htm iraq head] [http://polex.com.cn/resources/articles/garmin-.htm garmin - forerunner 301] [http://svike.info/view/new/foto-di.htm foto di fiche] [http://sneck.info/data/monnalisa/ monnalisa] [http://joperan.org/data/maddalena-crippa/ maddalena crippa] [http://primonona.info/content/view/la-rosa/ la rosa blu] [http://wedner.info/content/view/acer-hd.htm acer hd esterno 80gb] [http://polex.com.cn/resources/articles/titoli-esami.htm titoli esami di oggi] [http://veggis.org.cn/resources/articles/kit-home.htm kit home cinema harman kardon] [http://svike.info/view/new/giochi-in.htm giochi in generale] [http://wedner.info/content/view/fish-hungry.htm fish hungry] [http://wedner.info/content/view/classifica-single.htm classifica single] [http://veggis.org.cn/resources/articles/noleggio-vettura.htm noleggio vettura] [http://joperan.org/data/lotto-programma/ lotto programma] [http://soler.net.cn/data/dialogo-sulla.htm dialogo sulla nobilta] [http://veggis.org.cn/resources/articles/moto-dkw.htm moto dkw] [http://svike.info/view/new/home-theatre.htm home theatre kenwood 3 1] [http://xionny.cn/topic/diritto-penitenziario/ diritto penitenziario] [http://funkall.us/images/small/pc-workstation/ pc workstation] [http://funkall.us/images/small/delta-gps/ delta gps] [http://xionny.cn/topic/best-of/ best of santana] [http://funkall.us/images/small/zou-zou/ zou zou] [http://polex.com.cn/resources/articles/gruppi-sociali.htm gruppi sociali] [http://soler.net.cn/data/einstellung.htm einstellung] [http://klohy.info/img/styles/perazzolo-giorgio.htm perazzolo giorgio] [http://soler.net.cn/data/cock-max.htm cock max] [http://primonona.info/content/view/luce-elisa/ luce elisa] [http://xionny.cn/topic/pussy-lover/ pussy lover] [http://funkall.us/images/small/nikon-f/ nikon f-100] [http://soler.net.cn/data/italia-umbria.htm italia umbria vacanze] [http://sneck.info/data/preventivi-assicurativi/ preventivi assicurativi] [http://svike.info/view/new/nano.htm nano] [http://sneck.info/data/franchising-abbronzatura/ franchising abbronzatura] [http://wedner.info/content/view/xd-picture.htm xd picture card olympus 512 mb] [http://funkall.us/images/small/epson-photopc/ epson photopc l-300] [http://soler.net.cn/data/shirakaba.htm shirakaba] [http://primonona.info/content/view/pen-drive/ pen drive mp3 1gb] [http://primonona.info/content/view/fantasy-girl/ fantasy girl] [http://sneck.info/data/toto-live/ toto live] [http://veggis.org.cn/resources/articles/abit-uguru.htm abit uguru nforce2] [http://xionny.cn/topic/calendario-ragazze/ calendario ragazze del web] [http://klohy.info/img/styles/sologay.htm sologay] [http://veggis.org.cn/resources/articles/benny-benassy.htm benny benassy illusion] [http://veggis.org.cn/resources/articles/inspire-gd.htm inspire gd580 5 1] [http://primonona.info/content/view/caminetto-accessorio/ caminetto accessorio] [http://primonona.info/content/view/mp-player/ mp3 player nortek] [http://xionny.cn/topic/roselyn-sanchez/ roselyn sanchez] [http://polex.com.cn/resources/articles/alticini.htm alticini] [http://polex.com.cn/resources/articles/mario-winon.htm mario winon] [http://polex.com.cn/resources/articles/sapphire-radeon.htm sapphire radeon 9600 xt 128] [http://funkall.us/images/small/vacation-homes/ vacation homes] [http://xionny.cn/topic/audi-a/ audi a3 1.6] [http://manoke.cn/topic/lettore-mp/ lettore mp3 registratore 1gb] [http://wedner.info/content/view/masterizzatore-usb.htm masterizzatore usb slim] [http://polex.com.cn/resources/articles/hard-disk.htm hard disk lacie 300] [http://xionny.cn/topic/e-maze/ e maze] [http://sneck.info/data/freek/ freek] [http://polex.com.cn/resources/articles/casa-de.htm casa de dora] [http://wedner.info/content/view/rino-gaetano.htm rino gaetano midi] [http://primonona.info/content/view/stampante-hp/ stampante hp designjet 30] [http://sneck.info/data/tempurpedic-mattress/ tempurpedic mattress] [http://sneck.info/data/la-bestia/ la bestia nello spazio] [http://klohy.info/img/styles/seconda-prova.htm seconda prova d esame di maturita] [http://soler.net.cn/data/paola-e.htm paola e chiara cantanti] [http://sneck.info/data/successi-italiani/ successi italiani estate 2004] [http://veggis.org.cn/resources/articles/marna-alta.htm marna, alta-] [http://sneck.info/data/matty/ matty] [http://polex.com.cn/resources/articles/amd-ane.htm amd a8n-e] [http://wedner.info/content/view/usb-ethernet.htm usb ethernet] [http://wedner.info/content/view/lazlo.htm lazlo] [http://klohy.info/img/styles/piattaforma-trading.htm piattaforma trading on line] [http://soler.net.cn/data/foto-spiagge.htm foto spiagge nudismo] [http://svike.info/view/new/panasonic-.htm panasonic - th-42pa50e] [http://manoke.cn/topic/supporto-per/ supporto per tv ciatti] [http://veggis.org.cn/resources/articles/affinita-nomi.htm affinita nomi] [http://budget7i.info/lib/specialista-tempi/ specialista tempi e metodi (regione lombardia - milano provincia)] [http://manoke.cn/topic/moms-granny/ moms granny] [http://primonona.info/content/view/business-web/ business web site hosting] [http://veggis.org.cn/resources/articles/alimenti-contenenti.htm alimenti contenenti alluminio] [http://xionny.cn/topic/jeans-dolce/ jeans dolce gabbana donna abbigliamento] [http://sneck.info/data/rex-lavabiancheria/ rex lavabiancheria] [http://manoke.cn/topic/foto-fanni/ foto fanni cadeo] [http://soler.net.cn/data/simme-napule.htm simme napule] [http://joperan.org/data/scandalo-gf/ scandalo gf] [http://joperan.org/data/fattisentire/ fattisentire] [http://budget7i.info/lib/log-d/ log d attivazione] [http://polex.com.cn/resources/articles/www-pedagogia.htm www pedagogia it] [http://klohy.info/img/styles/natale-ungaretti.htm natale ungaretti] [http://klohy.info/img/styles/guadalupe.htm guadalupe] [http://manoke.cn/topic/ferro-termozeta/ ferro termozeta] [http://budget7i.info/lib/fragolina/ fragolina] [http://veggis.org.cn/resources/articles/sevillana.htm sevillana] [http://xionny.cn/topic/televisori-plasma/ televisori plasma] [http://wedner.info/content/view/scheda-video.htm scheda video ati 9800 xt] [http://veggis.org.cn/resources/articles/kiss-the.htm kiss the rain di billie myers] [http://manoke.cn/topic/acer-n/ acer n35 accessori] [http://wedner.info/content/view/barbra-streisand.htm barbra streisand memory] [http://polex.com.cn/resources/articles/assicurazione-dublino.htm assicurazione dublino] [http://sneck.info/data/tenda-esterno/ tenda esterno] [http://funkall.us/images/small/radiografie-scanner/ radiografie scanner] [http://primonona.info/content/view/macchina-cucito/ macchina cucito] [http://wedner.info/content/view/testo-the.htm testo the o c] [http://xionny.cn/topic/decoder-modulatore/ decoder modulatore] [http://polex.com.cn/resources/articles/terra-samba.htm terra samba] [http://xionny.cn/topic/ragazzo-trieste/ ragazzo trieste] [http://klohy.info/img/styles/marano.htm marano] [http://joperan.org/data/rapido-y/ rapido y furioso] [http://soler.net.cn/data/mardy-grass.htm mardy grass] [http://polex.com.cn/resources/articles/medleys.htm medleys] [http://manoke.cn/topic/il-contadino/ il contadino allegro] [http://xionny.cn/topic/prince-of/ prince of persia 2 trailer 5] [http://veggis.org.cn/resources/articles/gustavo-grande.htm gustavo grande fratello] [http://funkall.us/images/small/le-avventure/ le avventure di garfild] [http://funkall.us/images/small/clipart-cobra/ clipart cobra] [http://funkall.us/images/small/wanadootv-com/ wanadootv com] [http://manoke.cn/topic/tcdc-canon/ tc-dc58 canon] [http://xionny.cn/topic/quisiera-ser/ quisiera ser chayanne] [http://funkall.us/images/small/autocad-libri/ autocad libri] [http://joperan.org/data/copertina-dragostea/ copertina dragostea compilation] [http://polex.com.cn/resources/articles/playa-de.htm playa de las americas] [http://polex.com.cn/resources/articles/truth-is.htm truth is] [http://soler.net.cn/data/clip-blue.htm clip blue] [http://polex.com.cn/resources/articles/land-dead.htm land dead] [http://soler.net.cn/data/moto-aermacchi.htm moto aermacchi] [http://polex.com.cn/resources/articles/gaf-control.htm gaf control australia] [http://veggis.org.cn/resources/articles/sony-.htm sony - dcr hc17e] [http://xionny.cn/topic/spanish-speaking/ spanish speaking countrys] [http://primonona.info/content/view/rat-buster/ rat buster] [http://funkall.us/images/small/hull-albert/ hull, albert wallace] [http://sneck.info/data/elevator/ elevator] [http://sneck.info/data/ariante-tower/ ariante tower] [http://sneck.info/data/giochi-totalmente/ giochi totalmente gratuiti] [http://joperan.org/data/toples-dobry/ toples dobry dj] {{VersionInfo}}{{Version1.3}}{{Version1.4}}
  
  
Line 13: Line 13:
  
 
This utility '''can''' save you the work to program your own utility to set initial-conditions, but
 
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
+
* you should be familiar with the C   expression syntax
 
* it makes it easier to 'shoot yourself in the foot' (do stupid things)
 
* 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
 
* especially for large cases a custom-made utility might be more efficient
Line 53: Line 53:
 
  funkySetFields . cavity -field p -expression '0' -time 0
 
  funkySetFields . cavity -field p -expression '0' -time 0
 
The damBreak-tutorial could be initialized with
 
The damBreak-tutorial could be initialized with
  funkySetFields . damBreak -time 0 -field gamma -expression " pos().x <= 0.1461 && pos().y <= 0.292 ? 1 : 0"
+
  funkySetFields . damBreak -time 0 -field gamma -expression " pos().x <= 0.1461
or (if you don't want to overwrite the whole gamma field):
+
funkySetFields . damBreak -time 0 -field gamma -expression 1 -condition "pos().x <= 0.1461 && pos().y <= 0.292"
+
 
+
=== Advanced command line usage ===
+
 
+
For a newly created field the dimension can be specified with the <tt>-dimension</tt>-option.
+
 
+
Usually all the patches of the field (not the symmetry/wedge/...-stuff) are set to the type <tt>zeroGradient</tt>. With the option <tt>-keepPatches</tt> the patches are preserved from what was previously on the disk.
+
 
+
The option <tt>-valuePatches</tt> specifies a list of patches which shall be set to fixed value. The values are taken from the interior of the field.
+
 
+
For instance to get a similar behaviour as the <tt>setHotRoom</tt> that sets the boundary conditions for the <tt>hotRoom</tt>-tutorial these commands are issued:
+
 
+
funkySetFields . hotRoom -time 0 -field T -keepPatches -valuePatches "floor ceiling" -condition "pos().x>4.5 && pos().x<5.5 && pos().z>4.5 && pos().z<5.5 && pos().y<2" -expression "600."
+
funkySetFields . hotRoom -time 0 -field T -keepPatches -expression "300."
+
 
+
The first one sets the values on the patches, the second one clears the interior field.
+
 
+
=== Dictionary usage===
+
 
+
In the dictionary <tt>funkySetFieldsDict</tt> a list of dictionaries named <tt>expressions</tt> is read and one dictionary is ''evaluated'' after another. The title of the dictionaries is only used for documentation. In each dictionary there can be 3 entries:
+
;field: the target field
+
;expression: the expression to write to the field
+
;condition: select a subset of the cells (this is optional)
+
;keepPatches: see command line options (optional)
+
;create: see command line options (optional)
+
;valuePatches: see command line options (optional)
+
;dimesion: see command line options (optional)
+
 
+
An example dictionary would be:
+
<cpp>
+
expressions
+
(
+
circleVel
+
{
+
field U;
+
expression "(grad(dist())^vector(0,0,-1))*mag(pos()-vector(0.05,0.05,0))/0.05";
+
        }
+
pressure1
+
    {
+
field p;
+
expression "10.*(0.1-pos().y)";
+
}
+
pressure2
+
{
+
field p;
+
expression "p+U&U";
+
condition "pos().x > (max(pos().x)-min(pos().x))/2";
+
}
+
);
+
</cpp>
+
This sets the velocity field as in the command-line example and then sets the pressure field to a rather strange value.
+
 
+
== Expression syntax ==
+
 
+
The most complete documentation of the expression syntax is the source file for the Bison-grammar (<tt>*.yy</tt> and <tt>*.ll</tt>). Sorry.
+
 
+
These C++ operators are implemented:
+
; +,-,*,/ : Arithmetic operators. Can be used for vectors and scalars (only if useful. For instance: vectors can't be added to scalars)
+
; &,^ : The vector operators as defined by OpenFOAM
+
; <,>,<=,>=,!=,== : Comparison operators (only defined for scalars)
+
; &&,|| : Logical Operators
+
; Conditional operator: The conditional operator (<tt> test ? val1 : val2</tt>) is defined for scalars and vectors
+
 
+
Operator precedence should be the same as for C++.
+
 
+
All the fields in the current time-step can be used. If the field is also the target field the old value is used. Then the field is written using the new value.
+
 
+
These pseudo-variables are defined:
+
; pi : Guess ;)
+
These functions are defined:
+
; pow,log,exp,sqr,sqrt,sin,cos,tan : Only defined for scalars
+
; mag : defined for scalars and vectors
+
; grad : gradient of a scalar-field
+
; curl : curl of a vector-field
+
;snGrad: surface normal gradient
+
; div : divergence of a vector-field
+
; laplaction : laplacian of a field (with an optional "coefficient"-field)
+
; min,max : minimum and maximum of a scalar field
+
; average,integrate,sum,reconstruct : reconstruct a face field (yielding a volume field)
+
 
+
These pseudo-functions are defined:
+
; pos : Vector field with the cell-centers
+
; fpos : face-vectorField with the positions of the faces
+
; face : surface field with the face-vectors
+
; area : surface field with the face-areas
+
; dist : Scalar field that gives the distance to the nearest wall (using <tt>wallDist</tt>)
+
; rdist: a field with the distances from a given vector (save <tt>mag(pos()-v)</tt>)
+
; rand : Scalars-field with random numbers from [0,1]
+
; randNormal : Random-number scalar field that is Gauss-distributed
+
; vol : Volume of the cells
+
; deltaT : a field that returns the time-step
+
; time : a field that returns the current time
+
 
+
== Technical ==
+
 
+
* the utility only writes  <tt>volScalar</tt>- and <tt>volVectorField</tt>s. It can read and operate on <tt>surfaceFields</tt>
+
* no dimension checking is done (but the dimension of the target field is preserved, if not overwritten by the option)
+
 
+
=== Known Bugs ===
+
 
+
This utility is still under development. Therefore there is a number of known bugs (and also some unknown ones)
+
 
+
* Numbers without a decimal point are not correctly recognized
+
* Subtracting two numbers does not work (but subtracting fields does)
+
 
+
== Download ==
+
 
+
[[Media:funkySetFields.r7568.tar.gz|funkySetFields.r7568.tar.gz]]: The tar file with the sources and included generated sources. Works with 1.4<br>
+
[[Media:funkySetFields.r7241.tar.gz|funkySetFields.r7241.tar.gz]]: The last version that works with 1.3
+
 
+
=== Ancient history ===
+
 
+
[[Media:funkySetFields.tar.gz|funkySetFields.tar.gz]]: The original Version that worked with {{Version1.3}}
+
 
+
[[Media:funkySetFields-generatedSources.diff.gz|funkySetFields-generatedSources.diff.gz]]: The diff file with bison-generated (by bison-2.1) sources and patches to compile funkySetFields under OpenFOAM-1.3 and without bison 2.1 (the current bison version 2.3 generates .C files which can't be compiled by gcc-4.1.0 included in OpenFOAM-1.3). {{Version1.3}} (To Bgschaid: Feel free to remove this link upon completion of the new release. [[User:7islands|7islands]] 00:47, 18 Feb 2007 (CET))
+
 
+
[[Media:FunkySetFields.r7106.tar.gz|funkySetFields.r7106.tar.gz]]: A new version of funkySetFields. Not described yet on this page. Some of the new features include
+
* new fields are created
+
* ability to write fixedValue-patches
+
* work with cell sets
+
* work with surfaceFields (on writing)
+
 
+
An update of this page will follow in the next days. The generated files for those laking the right bison-Version will also be added {{Version1.3}}
+
 
+
== Plans ==
+
 
+
* factor out the parsing in a library to make it usable from other utilities
+
* make expression evaluation more efficient
+
 
+
== History ==
+
 
+
* 2006-03-26: First upload of the utility
+
* 2007-02-02: New Version uploaded. Has more features than described on this page
+
* 2007-03-02: New Version with included generated Files uploaded and new features descibed
+
* 2007-06-20: New Version that works with 1.4 and addtions by Takuya Oshima (rdist and deltaT)
+
 
+
--[[User:Bgschaid|Bgschaid]] 22:53, 26 Mar 2006 (CEST)
+

Revision as of 17:16, 28 August 2007

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