programmers guide

Download Programmers Guide

Post on 21-Nov-2014

122 views

Category:

Documents

7 download

Embed Size (px)

TRANSCRIPT

OpenFOAMThe Open Source CFD ToolboxProgrammersGuideVersion1.624thJuly2009P-2Copyright c 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009OpenCFDLimited.Permissionisgrantedtocopy, distributeand/ormodifythisdocumentunderthetermsof theGNUFreeDocumentationLicense, Version1.2publishedbytheFreeSoftwareFoundation;withnoInvariantSections,noBack-CoverTexts andoneFront-CoverText:Available free fromopenfoam.org. Acopyof the license is includedinthe sectionentitledGNUFreeDocumentationLicense.Thisdocumentisdistributedinthehopethatitwill beuseful, butWITHOUTANYWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESSFORAPARTICULARPURPOSE.TypesetinLATEX.OpenFOAM-1.6P-3GNUFreeDocumentationLicenseVersion1.2,November2002Copyright c 2000,2001,2002FreeSoftwareFoundation,Inc.59TemplePlace,Suite330,Boston,MA02111-1307USAEveryoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,butchangingitisnotallowed.PreambleThe purpose of this License is tomake amanual, textbook, or other functional andusefuldocumentfreeinthesenseoffreedom: toassureeveryonetheeectivefreedomtocopyandredistributeit, withorwithoutmodifyingit, eithercommerciallyornoncommercially. Secon-darily, thisLicensepreservesfortheauthorandpublisherawaytogetcreditfortheirwork,whilenotbeingconsideredresponsibleformodicationsmadebyothers.ThisLicenseisakindof copyleft, whichmeansthatderivativeworksof thedocumentmustthemselvesbefreeinthesamesense. ItcomplementstheGNUGeneral PublicLicense,whichisacopyleftlicensedesignedforfreesoftware.WehavedesignedthisLicenseinordertouseitformanualsforfreesoftware,becausefreesoftwareneedsfreedocumentation: afreeprogramshouldcomewithmanualsprovidingthesamefreedomsthatthesoftwaredoes. ButthisLicenseisnotlimitedtosoftwaremanuals; itcanbeusedforanytextual work, regardlessofsubjectmatterorwhetheritispublishedasaprinted book. We recommend this License principally for works whose purpose is instruction orreference.1. APPLICABILITYANDDEFINITIONSThis License applies to any manual or other work, in any medium, that contains a notice placedbythecopyrightholdersayingitcanbedistributedunderthetermsof thisLicense. Suchanoticegrantsaworld-wide, royalty-freelicense, unlimitedinduration, tousethatworkundertheconditionsstatedherein. TheDocument, below, referstoanysuchmanual orwork.Anymemberofthepublicisalicensee, andisaddressedasyou. Youacceptthelicenseifyoucopy,modifyordistributetheworkinawayrequiringpermissionundercopyrightlaw.AModiedVersionof theDocument means anyworkcontainingtheDocument oraportionof it, eithercopiedverbatim, orwithmodicationsand/ortranslatedintoanotherlanguage.ASecondarySectionisanamedappendixorafront-mattersectionoftheDocumentthat dealsexclusivelywiththerelationshipof thepublishersorauthorsof theDocument totheDocuments overall subject (or torelatedmatters) andcontains nothingthat couldfalldirectlywithinthatoverall subject. (Thus, if theDocumentisinpartatextbookof mathe-matics, aSecondarySectionmaynotexplainanymathematics.) Therelationshipcouldbeamatter of historical connection with the subject or with related matters, or of legal, commercial,philosophical,ethicalorpoliticalpositionregardingthem.TheInvariantSectionsarecertainSecondarySectionswhosetitlesaredesignated, asbeingthoseofInvariantSections, inthenoticethatsaysthattheDocumentisreleasedunderthis License. If a section does not t the above denition of Secondary then it is not allowed to bedesignatedasInvariant. TheDocumentmaycontainzeroInvariantSections. IftheDocumentdoesnotidentifyanyInvariantSectionsthentherearenone.TheCoverTexts are certain short passages of text that are listed, as Front-Cover TextsorBack-CoverTexts,inthenoticethatsaysthattheDocumentisreleasedunderthisLicense.A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.ATransparentcopyof theDocumentmeansamachine-readablecopy, representedinaformatwhosespecicationisavailabletothegeneral public, thatissuitableforrevisingtheOpenFOAM-1.6P-4document straightforwardly with generic text editors or (for images composed of pixels) genericpaintprogramsor(fordrawings)somewidelyavailabledrawingeditor,andthatissuitableforinput to text formatters or for automatic translation to a variety of formats suitable for input totext formatters. A copy made in an otherwise Transparent le format whose markup, or absenceof markup, has been arranged to thwart or discourage subsequent modication by readers is notTransparent. An image format is not Transparent if used for any substantial amount of text. AcopythatisnotTransparentiscalledOpaque.ExamplesofsuitableformatsforTransparentcopiesincludeplainASCIIwithoutmarkup,Texinfoinputformat, LaTeXinputformat, SGMLorXMLusingapubliclyavailableDTD,andstandard-conformingsimpleHTML, PostScriptorPDFdesignedforhumanmodication.ExamplesoftransparentimageformatsincludePNG,XCFandJPG.Opaqueformatsincludeproprietary formats that can be read and edited only by proprietary word processors, SGML orXMLforwhichtheDTDand/orprocessingtoolsarenotgenerallyavailable,andthemachine-generatedHTML, PostScriptorPDFproducedbysomewordprocessorsforoutputpurposesonly.TheTitlePage means, for a printed book, the title page itself, plus such following pagesas are needed to hold, legibly, the material this License requires to appear in the title page. Forworksinformatswhichdonothaveanytitlepageassuch, TitlePagemeansthetextnearthemostprominentappearanceoftheworkstitle,precedingthebeginningofthebodyofthetext.AsectionEntitledXYZmeansanamedsubunitoftheDocumentwhosetitleeitherispreciselyXYZorcontainsXYZinparenthesesfollowingtextthattranslatesXYZinanotherlanguage. (HereXYZstandsforaspecicsectionnamementionedbelow,suchasAcknowl-edgements, Dedications, Endorsements, orHistory.) ToPreservetheTi-tle of such a section when you modify the Document means that it remains a section EntitledXYZaccordingtothisdenition.TheDocumentmayincludeWarrantyDisclaimersnexttothenoticewhichstatesthatthisLicense applies to the Document. These Warranty Disclaimers are considered to be included byreference in this License, but only as regards disclaiming warranties: any other implication thattheseWarrantyDisclaimersmayhaveisvoidandhasnoeectonthemeaningofthisLicense.2. VERBATIMCOPYINGYoumaycopyanddistributetheDocumentinanymedium, eithercommerciallyornoncom-mercially, providedthatthisLicense, thecopyrightnotices, andthelicensenoticesayingthisLicenseappliestotheDocumentarereproducedinallcopies, andthatyouaddnoothercon-ditionswhatsoevertothoseofthisLicense. Youmaynotusetechnicalmeasurestoobstructorcontrolthereadingorfurthercopyingofthecopiesyoumakeordistribute. However,youmayacceptcompensationinexchangeforcopies. Ifyoudistributealargeenoughnumberofcopiesyoumustalsofollowtheconditionsinsection3.Youmayalsolendcopies, underthesameconditionsstatedabove, andyoumaypubliclydisplaycopies.3. COPYINGINQUANTITYIf youpublishprintedcopies(orcopiesinmediathatcommonlyhaveprintedcovers)of theDocument,numberingmorethan100,andtheDocumentslicensenoticerequiresCoverTexts,youmust enclosethecopies incovers that carry, clearlyandlegibly, all theseCover Texts:Front-CoverTextsonthefrontcover, andBack-CoverTextsonthebackcover. Bothcoversmust also clearly and legibly identify you as the publisher of these copies. The front cover mustpresentthefull titlewithall wordsof thetitleequallyprominentandvisible. Youmayaddother material on the covers in addition. Copying with changes limited to the covers, as long asthey preserve the title of the Document and satisfy these conditions, can be treated as verbatimcopyinginotherrespects.OpenFOAM-1.6P-5If the required texts for either cover are too voluminous to t legibly, you should put the rstoneslisted(asmanyastreasonably)ontheactualcover,andcontinuetherestontoadjacentpages.IfyoupublishordistributeOpaquecopiesoftheDocumentnumberingmorethan100,youmust either include a machine-readable Transparent copy along with each Opaque copy, or statein or with each Opaque copy a computer-network location from which the general network-usingpublichasaccesstodownloadusingpublic-standardnetwork protocolsacompleteTransparentcopyof theDocument, freeof addedmaterial. If youusethelatter option, youmust takereasonablyprudentsteps,whenyoubegindistributionofOpaquecopiesinquantity,toensurethatthisTransparentcopywillremainthusaccessibleatthestatedlocationuntilatleastoneyear after thelast timeyoudistributeanOpaquecopy(directlyor throughyour agents orretailers)ofthateditiontothepublic.Itisrequested,butnotrequired,thatyoucontacttheauthorsoftheDocumentwellbeforeredistributing any large number of copies, to give them a chance to provide you with an updatedversionoftheDocument.4. MODIFICATIONSYoumaycopyanddistribute aModiedVersionof the Document under the conditions ofsections 2and3above, providedthat youreleasetheModiedVersionunder preciselythisLicense,withtheModiedVersionllingtheroleoftheDocument,thuslicensingdistributionandmodicationof theModiedVersiontowhoeverpossessesacopyof it. Inaddition, youmustdothesethingsintheModiedVersion:A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document,andfromthoseof previous versions (whichshould, if therewereany, belistedintheHistory section of the Document). You may use the same title as a previous version if theoriginalpublisherofthatversiongivespermission.B. ListontheTitlePage, asauthors, oneormorepersonsorentitiesresponsibleforau-thorshipof themodicationsintheModiedVersion, togetherwithatleastveof theprincipalauthorsoftheDocument(allofitsprincipalauthors,ifithasfewerthanve),unlesstheyreleaseyoufromthisrequirement.C. State on the Title page the name of the publisher of the Modied Version, as the publisher.D. PreserveallthecopyrightnoticesoftheDocument.E. Add an appropriate copyright notice for your modications adjacent to the other copyrightnotices.F. Include, immediatelyafterthecopyrightnotices, alicensenoticegivingthepublicper-missiontousetheModiedVersionunderthetermsofthisLicense, intheformshownintheAddendumbelow.G. Preserve in that licen