Escolar Documentos
Profissional Documentos
Cultura Documentos
DanieleColomboAnintroductiontoCode_Aster
Goalsandbasicknowledge
Goalsandbasicknowledge
WhatisCode_Aster?
Code_AsterisaFEsolver: nofancytoolstocreateageometryandtomeshit nocolourfulpostprocessingimages noclick'n'dropinterfaces. preprocessing (geometry, mesh) commandfile describingthe simulation
mesh
Code_Aster
u,,...
postprocessing oftheresults
Somepre/postprocessingcapabilitiesareindeedavailableinCode_AsterbutI willnotspeakaboutthem.
DanieleColomboAnintroductiontoCode_Aster
Pre/postprocessing
Pre/postprocessing
Salomeisafreesoftwarepre/postprocessingtoolcapableof exportingandimportingMEDfiles:
MED
MED
postprocessing oftheresults
Code_Aster
Salome
ThecommandfilemustbehowevercreatedoutsideSalome.
DanieleColomboAnintroductiontoCode_Aster
Pre/postprocessing
Code_Aster
Salome
postprocessing oftheresults
SalomeMeca
DanieleColomboAnintroductiontoCode_Aster
SalomeMeca
useofawizard:youenteralltheseinformationsinaGUI
DanieleColomboAnintroductiontoCode_Aster
SalomeMeca
inthewizardyoucanusethesegroupstoapplyboundary conditions,forces,pressures,materialsandsoon.
DanieleColomboAnintroductiontoCode_Aster
SalomeMeca
youcanreadthesefilesdirectlyinsideSalomeMeca
Code_AstercreatesoneMEDfilecontainingalltheresults
nodaldisplacements,stressesatnodes,equivalentstressesatnodes... Youcanpostprocesstheseresultsusingthepostprocessing capabilitiesofSalomeMeca
DanieleColomboAnintroductiontoCode_Aster
SalomeMecademonstration
DanieleColomboAnintroductiontoCode_Aster
SalomeMeca
Asyouhaveseen,thewizardhasseverallimitations: youcanmanageonlysomekindsofsimulations
linearelasticanalyses modalanalyses linearthermalanalyses
foreachsupportedanalysis,notallthefeaturesofCode_Aster areavailable
e.g.:inalinearelasticanalysisyoucan'tdefinemorematerials,mechanical contactbetweenparts,cracks...
theoutputisalwayslimitedtosomepredefinedvariables
e.g.:inalinearelasticanalysisonlynodaldisplacements,stressesat nodesandequivalentstressesatnodesareproducedintheoutputfile. Whatcanyoudoifyouneed,forexample,reactionforces?
DanieleColomboAnintroductiontoCode_Aster
Code_Astercommandfile
agraphicaltoolcalledEficascanbeusedtosimplifythis task
Thisistheeasiestway:justrunEficasfromSalomeMeca.
Let'strytoobtainreactionforcesfromoursimulation...
DanieleColomboAnintroductiontoCode_Aster
Eficas
DanieleColomboAnintroductiontoCode_Aster
Reactionforces
DanieleColomboAnintroductiontoCode_Aster
Code_Astercommandfile:theotherway
Commandfilesyntax
thecommandfileisapythonscript
youcansimplyignoreit!
it'scomposedbyasequenceof commands
xyz=command(...)
eachcommandproducesaconcept (everythingisontheleftofthe=)
xyzisapythonobject
Commandfilesyntax
DanieleColomboAnintroductiontoCode_Aster
Commandfilesyntax
DanieleColomboAnintroductiontoCode_Aster
Simpleandcomposedkeywords
Eachcommandacceptoneormoreparametersidentifiedbya keyword: concept=COMMAND(keyword_1=xxx, keyword_2=yyy, ... keyword_n=zzz) Inthecaseofasimplekeyword,itsvalueisgivendirectlyafterthe =.Itcanbeasimplevalue(e.g.integer,realoranother concept)oralistofsimplevalues: concept_1=COMMAND_1(simple_keyword_1=3) concept_2=COMMAND_2(simple_keyword_1=1.56, simple_keyword_2=(1.0,0.0,5.6), simple_keyword_3=concept_1)
DanieleColomboAnintroductiontoCode_Aster
Simpleandcomposedkeywords
DanieleColomboAnintroductiontoCode_Aster
Commandfilesyntax
otherbehavioursaregivenbymeansof othercomposedkeywords
e.g.:ECRO_LINEforalinearhardeningmaterial THERMforthethermalproperties ...
DanieleColomboAnintroductiontoCode_Aster
Somethingabouttheconcepts
ThematerialdefinitionwillbecontainedinaconceptnamedMA: Themaximumlengthoftheconceptnameis8characters Iftheresultingconceptexistsbeforeexecutingthecommand, anerrorisissuedandtheanalysisisaborted. Thisconceptisapythonobject.Thismeansthatithasatype associated: TheresultingconceptMAisautomaticallycreatedbythe command,whichdeterminesalsoitstype TheconceptMAcanbeusedasthevalueofasimple keywordsonlyifitstypeiscoincidentwiththetyperequestedby thekeyword.
DanieleColomboAnintroductiontoCode_Aster
Somethingabouttheconcepts
Forexample,Iwanttodefinetwoelasticmaterials(agenericsteel andagenericaluminium). ThesetwomaterialshavedifferentvaluesoftheYoung'smodule butthesame(moreorless)valueofthePoissonratio. Inordertoforcethisequality,Ideclaretheminthefollowingway: steel=DEFI_MATERIAU(ELAS=_F(E=2.06E11, NU=0.3,),) alu=DEFI_MATERIAU(ELAS=_F(E=0.76E11, NU=steel,),) Thisisnotcorrectbecausesteelisaconceptoftypematerialwhilst thekeywordNUrequiresaconceptoftypereal!
DanieleColomboAnintroductiontoCode_Aster
Somethingabouttheconcepts
Thecorrectwaytodothatwouldbetheuseofavariable(don't forgetwearewritingapythonscript):
DanieleColomboAnintroductiontoCode_Aster
Commandfilesyntax
LIRE_MAILLAGE=readmesh InCode_Asterthemeshissimplyalist ofnodes(numberandcoordinates)and elements(theirdefinitionintermsof geometricalshapeanddefiningnodes) Everythingwillbecontainedinthe conceptMAIL ThemeshiscontainedinaMEDfile (FORMAT='MED') Yes,reallysimple.Justaquestion:of whichfileareyouspeakingabout?
DanieleColomboAnintroductiontoCode_Aster
Selectinginputandoutputfiles
AsinthecaseofLIRE_MAILLAGE,thereareothercommands workingonfiles(ininputoroutput). Thenameofthefilereadorwrittenbyacommandisnotspecified inthecommandfilebutoutsideit: thisabstractionfacilitatesthecreationofscripts,asinthe caseofparametricstudieswherethesameanalysisisrunusing differentmeshes it'sreallypracticalinallthecasesinwhichoneormore input/outputfileschange(differentnamesorpaths,different meshes...):nothingchangesinthecommandfile! Agraphicaltool,calledASTK,canbeusedtolistallthefiles neededbythesimulation. ifyouaresoinclined,youcanalsousetheUnixcommand line(I'mnotgoingtotalkaboutittoday)
DanieleColomboAnintroductiontoCode_Aster
Selectinginputandoutputfiles
DanieleColomboAnintroductiontoCode_Aster
Selectinginputandoutputfiles
Eachfilehasatypeassociated:
Selectinginputandoutputfiles
Herearethebasicfilesmanagedbyeachsimulation:
resu:atextfilecontainingtheresultsofthe
simulationinatableformat
rmed:it'stheMEDfilecontainingtheresultsofthe
simulation
base:it'safoldercontainingtheoutputdatabase
ofthesolver.Itwillbeusedtocontinuethesimulation (bymeansofaPOURSUITE)orforpostprocessing
DanieleColomboAnintroductiontoCode_Aster
Selectinginputandoutputfiles
DanieleColomboAnintroductiontoCode_Aster
Selectinginputandoutputfiles
iftheLUnumberisnotgivenasa parameterofthecommand,thedefault oneisused thisisthecaseforourexample:the LIRE_MAILLAGEcommandwillreadthefile associatedtothedefaultLUnumberfora MEDmeshfile(rmed) youdon'tneedtoknowwhichisthis defaultLUnumberifyouhaven'tchanged theLUnumberbyhandinASTK.
DanieleColomboAnintroductiontoCode_Aster
Selectinginputandoutputfiles
mail=LIRE_MAILLAGE(FORMAT='MED', UNITE=21,),)
DanieleColomboAnintroductiontoCode_Aster
DefaultLUnumbers
Selectinginputandoutputfiles
InASTKyoucanalsospecifysomeimportantpropertiesofeach listedfile: inputoroutputfile? itwillbecreatedduringorattheendoftheanalysis itisprovidedbytheuseratthebeginningoftheanalysis isthefilecompressed? Thefilecanbecompressedusinggzipinordertosavedisk spaceandtransfertime(e.g.fromtheclustertothelocal computer) Fortheinputfile,theusermustcompressthefileusinggzip.In thecaseofoutputfiles,Code_Asterwillcompressthem automaticallyattheendofthesimulation.
DanieleColomboAnintroductiontoCode_Aster
Selectinginputandoutputfiles
DanieleColomboAnintroductiontoCode_Aster
Commandfilesyntax
AFFE_MODELE=assignmodel Thiscommandallowtoassigna particularphysicalmodelandelement typetoamesh.AFEmodeliscreated. mechanical,thermal,acoustic axialsymmetric,planestress/strain,shell, beam,plate... Firstthemeshisselectedbymeansof theMAILLAGE(=mesh)keyword MAILisanexistingconcept!
DanieleColomboAnintroductiontoCode_Aster
Commandfilesyntax
ThecomposedkeywordAFFEallowstospecifythephysical phenomenonandelementtypetobeassignedtoapartorthe wholemesh: where?TOUT='OUI'meansWHOLE_MESH='YES' whichphenomenon?PHENOMENE='MECANIQUE'specifies thatwewanttomodelamechanicalphenomenon(nota thermaloracousticone) whichtypeofelement?MODELISATION='3D'specifiesthatwe wanttouse3Dsolidelements(andnot,forexample,3Dbeam elements).
DanieleColomboAnintroductiontoCode_Aster
Commandfilesyntax
Thegroupofkeywordsinside_F(...)canberepeatedtodefineall themodelizationsrequiredinthemodel Forexample,inthecaseinwhichboth3Dsolidelementsand3D beamsarepresentinthemesh,thefollowingcommandcanbe usedtoassignthepropertiestotheelements: mode=AFFE_MODELE(MAILLAGE=MAIL, AFFE=(_F(GROUP_MA='solid', PHENOMENE='MECANIQUE', MODELISATION='3D',), _F(GROUP_MA='beam', PHENOMENE='MECANIQUE', MODELISATION='POU_D_E',),),) solidandbeamaretwogroupsofelements(GROUP_MA)defined insidethemeshMAIL(bymeansofSalome)
DanieleColomboAnintroductiontoCode_Aster
Commandfilesyntax
AFFE_MATERIAU=assignmaterial Thiscommandallowtoassigna materialtotheelementsofamesh Thesyntaxissimilartowhatwehave alreadydiscussed Thematerialmustbedefinedbefore usingthecommandbymeansof DEFI_MATERIAU Theconceptcreatedbythecommand (MATE)isamaterialfield,anunusual entityforFEsolvers!
DanieleColomboAnintroductiontoCode_Aster
Overloading
HowcanIassignmorethenonematerialtoaFEmesh? Wehavealreadydefinedtwomaterials:
poisson=0.3 steel=DEFI_MATERIAU(ELAS=_F(E=2.06E11, NU=poisson,),) alu=DEFI_MATERIAU(ELAS=_F(E=0.76E11, NU=poisson,),)
Overloading
Theassignmentofthematerialscanbedoneinthefollowingway: mate=AFFE_MATERIAU(MAILLAGE=MAIL, AFFE=(_F(GROUP_MA='ELsteel', MATER=steel, _F(GROUP_MA='ELalu', MATER=alu,),),) Anothersolutionwouldbetheuseoftheoverloadingrule: ifmorethanonepropertyisassignedtothesameentity,only thelastassignmentisconsidered inotherwords,ifeachassignmentoverwritestheprevious one.
DanieleColomboAnintroductiontoCode_Aster
Overloading
Theoverloadedversionoftheassignmentisthefollowing: mate=AFFE_MATERIAU(MAILLAGE=MAIL, AFFE=(_F(TOUT='OUI', MATER=steel, _F(GROUP_MA='ELalu', MATER=alu,),),) Here'swhathappens: first,thematerialsteelisassignedtoalltheelementsofthe meshMAIL then,thematerialaluisassignedonlytotheelementsinthe groupELalu thematerialsteelassignedpreviouslytotheseelements (Elalu)isoverwrittenbythesecondassignment.
DanieleColomboAnintroductiontoCode_Aster
Overloading
DanieleColomboAnintroductiontoCode_Aster
SalomeMeca+Eficasexample
DanieleColomboAnintroductiontoCode_Aster
SalomeMeca+Eficasexample
DanieleColomboAnintroductiontoCode_Aster
Commandfilesyntax
Commandfilesyntax
MECA_STATIQUE=assemblytheFE discretesetofequationsandsolveitfora linearstaticmechanicalmodel InoppositiontomanyotherFEsolvers, atthispointtheusermustspecifythe model,thematerialsandtheloadstobe appliedandusedintheassembly. Thismeansthatnotallthedefined materials,loads,boundaryconditionsand models(yes,Iwrotemodels)willbeused duringtheassemblyoftheFEmodeltobe solved!
DanieleColomboAnintroductiontoCode_Aster
Nonlinearitiesanddynamic/thermalsimulations
ThecommandMECA_STATIQUEcan'tbeusedifnonlinearities (geometricaland/orinthematerialbehaviour)arepresent.
Inthiscaseanothercommandmustbeused:STAT_NON_LINE.
Again,othercommandsmustbeusedinthecaseofathermal simulation(THER_LINEAIRE,THER_NON_LINE,THERM_NON_LINE_MO)
DanieleColomboAnintroductiontoCode_Aster
Commandfilesyntax
DanieleColomboAnintroductiontoCode_Aster
Commandfilesyntax
CALC_ELEM=calculateelement Thiscommandallowstocalculateone ormorefieldsassociatedtoanelement stresses,strains... Thefieldstobecalculatedarespecified bymeansoftheOPTIONkeyword Thecalculationisperformedstarting fromtheconceptRESU(RESULTAT=RESU) containingtheresultsofoursimulation (onlynodaldisplacements)
DanieleColomboAnintroductiontoCode_Aster
Enrichment/modificationofanexistingconcept
TheconceptcreatedbythecommandisRESU.Italreadyexists becauseithasbeencreatedbyMECA_STATIQUE. Thegoalofthecommandistheenrichmentofthisconcept:some newfieldsareadded(theyarespecifiedbymeansoftheOPTION keyword) rememberthattheconceptproducedbythecommand mustnotexist wemustdeclareourgoalbymeansofthekeywordreuse otherwisewemustchangethenameoftheconceptonthe leftof=.
DanieleColomboAnintroductiontoCode_Aster
Uselesskeywords
DanieleColomboAnintroductiontoCode_Aster
Fieldnamemeaning
Fieldnamemeaning
SIGM_XXXX_DEPL
NOEU(node):thecalculationmustbedoneateachnode
ameanvalueofthevaluescomingfromeachelementsharingthenode iscalculated'
DanieleColomboAnintroductiontoCode_Aster
Fieldnamemeaning
DanieleColomboAnintroductiontoCode_Aster
Commandfilesyntax
CALC_NO=calculatenode Thiscommandallowstocalculateone ormorefieldsassociatedtoanodeandit workslikeCALC_ELEM Youcancalculatenodalfields:reaction forces,nodalforcesandallthefieldsof thetypexxxx_NOEU_xxxx Thefieldxxxx_NOEU_xxxxcanbe calculatedonlyifthecorrespondingELNO fieldexistsintheconceptgivenby RESULTAT
SIGM_NOEU_DEPLcanbecalculatedonlyif SIGM_ELNO_DEPLexists!
DanieleColomboAnintroductiontoCode_Aster
xxxx_ELNO_xxxxxxxx_NOEU_xxxx
DanieleColomboAnintroductiontoCode_Aster
Commandfilesyntax
IMPR_RESU=printresults Thiscommandallowstoprinttheresults inoneormoreoutputfiles Theformatfortheoutputfileischosen bymeansoftheFORMATkeyword Ifyoudon'tspecifyanyfield (NOM_CHAM),allthefieldscontainedin theresult(RESULTAT=RESU)willbewrittenin theoutputfile. Notethatnoconceptsarecreatedby thiscommand
DanieleColomboAnintroductiontoCode_Aster
Outputformats
DanieleColomboAnintroductiontoCode_Aster
Commandfilesyntax
DanieleColomboAnintroductiontoCode_Aster
Documentation
Thecommandswehaveanalysedarethemostcommonand basicones. Ahugedocumentationdescribingallthecommandsandoptions isavailableontheprojectwebsite: http://www.codeaster.org Therearethreetypesofdocuments: DocU:userdocumentationforcommandsyntaxandoptions DocR:referencedocumentationwheredetailedtechnical informationsaboutdifferentsubjectsofthecodeareexplained DocV:documentationofthevalidationtestcaseswherethe testsusedtovalidateallthecommandsandoptionsofthecode aredescribedindetails.
DanieleColomboAnintroductiontoCode_Aster
DanteAlighieriDivineComedyhttp://en.wikipedia.org/wiki/Divina_commedia
Documentation
Howthesyntaxofeachcommand(DocU)isexplained? Forexample,fortheLIRE_MAILLAGEdocumentation:
acceptedkeywordvalues concept
typeoftheacceptedvalue
Asyousee,Eficasreproducesthisstructureanditsrules!
DanieleColomboAnintroductiontoCode_Aster
Testcases
HowcanIstartusingeffectivelyCode_Asterforacertaintypeof simulation? BeforetryingtocreateyourFEmodelfromscratch: Getfamiliarwiththebasiccommandswehaveseentoday Searchforinformationsaboutthekindofsimulationyouwantto dointheRdocuments GothroughtheUdocumentsforthecommandsyouaregoingto use(commandfiletemplatesareusuallygiveninRdocuments) StudythetestcasesavailableinCode_Astercoveringthe commandsyouwanttouse
eachversionofCode_Astercomeswithahugetestcasebase.You canfinditin$ASTER/$VERSION/astest
DanieleColomboAnintroductiontoCode_Aster
Code_Asterversions
adevelopmentversion(atthemoment,version10)
Thisversionmustbeconsideredtheunstablerelease Featuresareaddedandremovedandbugcorrectionsare guaranteed Thesyntaxofthecommandcanundergoheavilymodificationsat eachnewrelease Thisversionshouldbeusedonlyifyouneedanewfeaturenot availableintheoperatingversion.
DanieleColomboAnintroductiontoCode_Aster
Code_Asterversions
Foreachversion(operatinganddevelopment),youhavethree branches: theNEWbranch theSTAbranch theOLDbranch Forthedevelopmentversion,aNEWbranchisreleasedweekly followingthenewdevelopmentsofthecode Fortheoperatingversion,aNEWbranchisreleasedeachtimea bugcorrectionisreleased Eachsixmonths,astabilisationofthecodeisdone.TheNEW branchbecomestheSTAbranchandtheSTAbranchbecomesthe OLDbranch Achangeintheversionsisdonesimilarlyeachtwoyears.
DanieleColomboAnintroductiontoCode_Aster
Code_AsterattheUniversityofManchester
Herearethedetailsoftheavailableversions: developmentversion: NEW10 STA10 OLD10 NEW9 STA9 (version10.2.6) (version10.1.27) (version10.1.0) (version9.4.11) (version9.4.0)
operatingversion:
DanieleColomboAnintroductiontoCode_Aster
Code_AsterattheUniversityofManchester
AlltheinformationsneededtouseCode_Asterontheclustersare availableonawikipagehostedontheCFDtwiki:
http://cfd.mace.manchester.ac.uk/twiki/bin/view/Aster/WebHome
Forthemomentyoucan'tuseSalomeMecaonthecluster.
AwikipagewillbesoonavailableexplaininghowtouseCode_Aster ontheclustersdirectlyfromyourlocalversionofSalomeMeca.
DanieleColomboAnintroductiontoCode_Aster
Resources
Salome Freelyavailablefromhttp://www.salomeplatform.org/ Goodtutorials(inEnglish!)explaininghowtouseSalomeare availablefromtheUserSectionofthesamewebsite. SalomeMeca Freelyavailablefromhttp://www.codeaster.org/ (clickontlchargementandthenselectSalomeMecafromthe menuontheleft) CodeAster Freelyavailablefromhttp://www.codeaster.org/ (clickontlchargement)
DanieleColomboAnintroductiontoCode_Aster
Resources
AnofficialportingofSalometoWindowsisavailablefortestingat thefollowingaddress:
http://files.salomeplatform.org/cea/adam/salomewindows/download/
DanieleColomboAnintroductiontoCode_Aster
Thankyouforyourattention!
DanieleColomboAnintroductiontoCode_Aster