You are on page 1of 71

AnintroductiontoCode_Aster

DanieleColomboAnintroductiontoCode_Aster

Goalsandbasicknowledge

Goalsofthisshortcourse:
giveyoubasicknowledgeonhowCode_Asterworks
giveyouanoverviewonhowyoucanuseCode_Asterwith
thepre/postprocessortoolSalome
giveyouanoverviewonhowyoucanusetheSalome
Mecaenvironment.

Thiscourseisnot:
acourseonthefiniteelementmethod
acourseonhowthebehaviourofstructurescanbe
modelled(statics,dynamics,fatigue...)
acourseonhowprogramminginCode_Aster.
DanieleColomboAnintroductiontoCode_Aster

Goalsandbasicknowledge

Thereforeyoucangetmostoutofthiscourseifyouhave:
atheoreticalbaseontheFEmethod
basicknowledgeonhowastructuralFEsoftwareworks
someexperienceontheuseofastructuralFEsoftware.

ThesameFEsimulationcanbesuccessfullycarriedoutinmore
thanoneway
Inmyopinionthereisn'tthebestway
WhatIwillpresenttodayisjustmypersonalviewandwhatIthinkis
thesimplestwaytoapproachCode_Asterinourcontext.
DanieleColomboAnintroductiontoCode_Aster

WhatisCode_Aster?

Code_AsterisaFEsolver:
nofancytoolstocreateageometryandtomeshit
nocolourfulpostprocessingimages
noclick'n'dropinterfaces.
preprocessing
(geometry,
mesh)
commandfile
describingthe
simulation

mesh

Code_Aster

FEmodel
creationand
resolution

u,,...

postprocessing
oftheresults

text

Somepre/postprocessingcapabilitiesareindeedavailableinCode_AsterbutI
willnotspeakaboutthem.
DanieleColomboAnintroductiontoCode_Aster

Pre/postprocessing

Severaltoolscanbeusedtocreateameshandtovisualizethe
results,asfarasanimport/exportmoduleexistinCode_Aster:
Gmsh
IDEAS
Gibi
Anytoolcapableofimporting/exportingmeshesinMED
format
MEDisaplatformindependentfileformatfortheexchangeofmesh
data(nodes,elements,groupofnodes,groupofelements)andfields
definedonthesedata(e.g.stresses,strains,displacements,levelsets...)
AlibrarytomanageMEDfilesisfreelyavailable.

Yourpreferredpreprocessorsoftware,butyouneedtowrite
theinterfacelayer(usinge.g.MEDfile):Code_Asterisfree
software!
DanieleColomboAnintroductiontoCode_Aster

Pre/postprocessing

Salomeisafreesoftwarepre/postprocessingtoolcapableof
exportingandimportingMEDfiles:

preprocessing
(geometry,
mesh)
commandfile
describingthe
simulation
Salome

MED

FEmodel
creationand
resolution

Code_Aster

MED

postprocessing
oftheresults

Salome

ThecommandfilemustbehowevercreatedoutsideSalome.
DanieleColomboAnintroductiontoCode_Aster

Pre/postprocessing

Analternativeandmorecomfortablesolutionistousethe
SalomeMecaplatform:
it'samodifiedversionofSalomeincludingamoduleused
tocontrolCode_AsterdirectlyfromSalome
thecommandfileisgeneratedautomatically.
Salome

preprocessing
(geometry,
mesh)
commandfile
describingthe
simulation

Code_Aster

Salome

FEmodel
creationand
resolution

postprocessing
oftheresults

Salome
SalomeMeca
DanieleColomboAnintroductiontoCode_Aster

SalomeMeca

EvenifCode_Asterishiddenbehindthegraphicalinterfaceof
SalomeMeca,thewayinwhichSalomeandCode_Asterinteract
determinehowtheFEmodeliscreated:
onlymeshdataarepassedfromthepreprocessorto
Code_AsterbymeansofaMEDfile
MEDfile

nodes,elements,groupsofnodes,groupsofelements

useofgeometryandmeshcapabilitiesofSalomeasany
otherpreprocessorsoftware
alltheotheringredientsoftheFEmodelmustbewritten
insidethecommandfile
textfile

materials,forces,pressures,displacements...

useofawizard:youenteralltheseinformationsinaGUI
DanieleColomboAnintroductiontoCode_Aster

SalomeMeca

Howinformationsenteredinthewizardarelinkedtothemesh
dataincludedintheMEDfile?
youmustcreategroupsofnodes,elements,edgesand
facesinthemesh
youcandefinethesegroupsonthegeometryofthemodelordirectly
onthemesh
usinggeometricalgroupsallowsthemodificationofthemeshwithout
theneedtoredefinethegroups.

inthewizardyoucanusethesegroupstoapplyboundary
conditions,forces,pressures,materialsandsoon.

DanieleColomboAnintroductiontoCode_Aster

SalomeMeca

OnceCode_AsterhassolvedtheFEmodel,howaretheresults
importedintoSalomeMeca?
Code_Astercreatesatleasttwotextfiles:
.mess:containstheoutputofCode_Asterforeachcommand.The
errorandwarningmessagesarereportedinthisfile.
.resu:containstheoutputofsomeCode_Asterresultsintableform.

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

TheonlywaytoaccessallthefeaturesavailableinCode_Asteris
todirectlymanagethecommandfilebyhand:
thecommandfileisatextfile:edititwithyourpreferredtext
editor!
Thisisthehardestway!
YoumustknowCode_Astercommands,syntax,optionsandso
on.

agraphicaltoolcalledEficascanbeusedtosimplifythis
task
Thisistheeasiestway:justrunEficasfromSalomeMeca.

Let'strytoobtainreactionforcesfromoursimulation...
DanieleColomboAnintroductiontoCode_Aster

Eficas

DanieleColomboAnintroductiontoCode_Aster

Reactionforces

DanieleColomboAnintroductiontoCode_Aster

Code_Astercommandfile:theotherway

UsingEficasyoucan:
createacommandfilewhichissyntacticallycorrect
createacommandfilebyhandwithoutrememberingall
theoptionsofeachcommand.

However,youmusteditthecommandfilebyhandusingatext
editorifyouwanttogetmostoutofCode_Aster,e.g.:
usingthelatestdevelopmentfeatures
usingpythonprogramminginthecommandfile(loops,
conditionals,mathscalculations...).
Let'sanalysethecommandfileofourexampletounderstand
moreaboutCode_Aster.
DanieleColomboAnintroductiontoCode_Aster

Commandfilesyntax

thecommandfileisapythonscript
youcansimplyignoreit!

it'scomposedbyasequenceof
commands
xyz=command(...)

eachcommandproducesaconcept
(everythingisontheleftofthe=)
xyzisapythonobject

eachcommandhasoneormore
parameterswhereit'spossibletospecify
inputdataandoptionsforthecommand
theobjectsproducedbyaprevious
commandcanbeusedasinputparameters
DanieleColomboAnintroductiontoCode_Aster

Commandfilesyntax

DEBUT=begin
thisfunctionisusedtostartanew
analysis
ifthisanalysisisthecontinuationofa
previousone,youmustusethefunction
POURSUITE()instead.
POURSUITE=continue

DanieleColomboAnintroductiontoCode_Aster

Commandfilesyntax

DEFI_MATERIAU=definematerial
Youdefinethemechanicalproperties
ofamaterial
Nameassignedtothematerial:MA
Youareassigningonlytheelastic
propertiesofthematerialbymeansofthe
keywordELAS

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

Inthecaseofacomposedkeyword,itsvalueisalistofsimple
keywords:
concept_1=COMMAND_1(simple_keyword_1=3.0)
concept_2=COMMAND_2(simple_keyword_1=1.56,
composed_keyword_1=_F(
simple_keyword_2=3.1415,
simple_keyword_3=concept_1),)
Thelistofthesimplekeywordsofacomposedkeywordisgiven
inside_F(...).ThelettermeansfacteurinFrench.

DanieleColomboAnintroductiontoCode_Aster

Commandfilesyntax

Theelasticconstantsaregivenby
meansofthecomposedkeywordELAS
TheYoung'smodule(E)andPoisson
ratio(NU)aregiveninsidethecomposed
keywordbymeansoftwosimplekeywords

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):

poisson=0.3
steel=DEFI_MATERIAU(ELAS=_F(E=2.06E11,
NU=poisson,),)
alu=DEFI_MATERIAU(ELAS=_F(E=0.76E11,
NU=poisson,),)

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

IfyouuseSalomeMeca,theinput/outputfilesareautomatically
linkedtothecommandfileandyouhavenothingtodo
ThisistrueeveninthecaseinwhichyouuseSalomeMecato
createabasiccommandfileandthenyouuseEficastomodifyit
YoucanrunASTKdirectlyfromSalomeMeca.Let'scheckour
example:

DanieleColomboAnintroductiontoCode_Aster

Selectinginputandoutputfiles

Eachfilehasatypeassociated:

Eachtypehasalogicalunit(LU)numberassociated
Eachcommandaccess(read/write)afilebymeansofitslogical
unitnumberandnotitsname.
DanieleColomboAnintroductiontoCode_Aster

Selectinginputandoutputfiles

Herearethebasicfilesmanagedbyeachsimulation:

comm:it'sthecommandfileitself
mmed:it'stheMEDfilecontainingthemesh
mess:atextfilecontainingtheoutputfromthe
solver(messages,errors,warnings)

resu:atextfilecontainingtheresultsofthe
simulationinatableformat

rmed:it'stheMEDfilecontainingtheresultsofthe
simulation

base:it'safoldercontainingtheoutputdatabase
ofthesolver.Itwillbeusedtocontinuethesimulation
(bymeansofaPOURSUITE)orforpostprocessing
DanieleColomboAnintroductiontoCode_Aster

Selectinginputandoutputfiles

Eachofthisfiletypehasitslogicalunitnumberassignedbydefault.
Theusercanchangeit,evenifhemustpayattention,aswewill
seesoon.

DanieleColomboAnintroductiontoCode_Aster

Selectinginputandoutputfiles

iftheLUnumberisnotgivenasa
parameterofthecommand,thedefault
oneisused
thisisthecaseforourexample:the
LIRE_MAILLAGEcommandwillreadthefile
associatedtothedefaultLUnumberfora
MEDmeshfile(rmed)
youdon'tneedtoknowwhichisthis
defaultLUnumberifyouhaven'tchanged
theLUnumberbyhandinASTK.

DanieleColomboAnintroductiontoCode_Aster

Selectinginputandoutputfiles

Onthecontrary,ifyouhavechangedthedefaultLUnumberin
ASTK,youmustpassthenewonetothecommandbymeansof
thesimplekeywordUNITE

DefaultLUnumbers

mail=LIRE_MAILLAGE(FORMAT='MED',
UNITE=21,),)
DanieleColomboAnintroductiontoCode_Aster

Selectinginputandoutputfiles

InASTKyoucanalsospecifysomeimportantpropertiesofeach
listedfile:
inputoroutputfile?
itwillbecreatedduringorattheendoftheanalysis
itisprovidedbytheuseratthebeginningoftheanalysis
isthefilecompressed?
Thefilecanbecompressedusinggzipinordertosavedisk
spaceandtransfertime(e.g.fromtheclustertothelocal
computer)
Fortheinputfile,theusermustcompressthefileusinggzip.In
thecaseofoutputfiles,Code_Asterwillcompressthem
automaticallyattheendofthesimulation.
DanieleColomboAnintroductiontoCode_Aster

Selectinginputandoutputfiles

input
output
compressed

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,),)

Let'ssupposethattwogroupsofelementsaredefinedinthemesh,
eachonecontainingtheelementofthesamematerial:
ELsteelcontainstheelementsforsteel
ELalucontainstheelementsforaluminium
Theunionofthetwogroupscoversalltheelementsofthemesh,
thatiseachelementofthemeshbelongstoonegroup.
DanieleColomboAnintroductiontoCode_Aster

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

Theuseoftheoverloadingrulecanbereallyeffectiveinmany
situations.
Eveninthisreallysimpleexample,theadvantageswouldbe:
onlyonegroupofelements(ELalu)mustbedefinedand
maintainedinthemesh
amaterialisassignedtoalltheelementsofthemesh.There's
noriskthatoneormoreelementshavenomaterialassigned
becausetheyareoutsidethetwodefinedgroups(ELsteeland
ELalu)consequentlytoanerrorinthegroupcreation.
mate=AFFE_MATERIAU(MAILLAGE=MAIL,
AFFE=(_F(GROUP_MA='ELsteel',
MATER=steel,
_F(GROUP_MA='ELalu',
MATER=alu,),),)

DanieleColomboAnintroductiontoCode_Aster

SalomeMeca+Eficasexample

Let'strytomodifyourexampleinordertodefineatwomaterials
cube.
WewilluseSalomeMeca:
creationofapartitionedcube+ELalugroup
creationofaonematerialFEmodelbymeansofthewizard
modificationofthecommandfilebymeansofEficas:
definitionofthesecondmaterialandpropermaterial
assignmentstothemesh.

DanieleColomboAnintroductiontoCode_Aster

SalomeMeca+Eficasexample

DanieleColomboAnintroductiontoCode_Aster

Commandfilesyntax

AFFE_CHAR_MECA=assignmechanical
loads
Thiscommandallowtoassign
mechanicalloads,boundaryconditions
andcinematicconstraintstoaFEmodel
DDL_IMPO=assignavaluetooneore
moredegreesoffreedomofanode
PRES_REP=applyapressuretoa2D/3D
domain
DanieleColomboAnintroductiontoCode_Aster

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.

Similarly,othercommandsmustbeusedinthecaseofadynamic
simulation(DYNA_NON_LINE,DYNA_LINE_TRAN/DYNA_LINE_MODAL,
DYNA_LINE_HARM...)
Iwillnotspeakaboutdynamicsimulationsbecausethisis
outsidethegoalofthispresentation
(itwouldrequirealsoalotoftimeandabasicknowledgeofstructures
dynamicsfromyou)

Again,othercommandsmustbeusedinthecaseofathermal
simulation(THER_LINEAIRE,THER_NON_LINE,THERM_NON_LINE_MO)
DanieleColomboAnintroductiontoCode_Aster

Commandfilesyntax

Theconceptcreatedbythesolver(RESU)containstheresultsofthe
analysis:thedisplacementfieldofthemodel.
Thisisanodalfield.
Whataboutstresses,strains,reactionforces...?
Theyarenotavailabledirectly
Youmustcalculatethem,notbyhand.

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

Thecalculationisperformedstartingfromaconceptoftype
result(RESULTAT=RESU).
Thiskindofconceptcontainsallthemodelinformationsinaddition
tothenodaldisplacementfield(whichiseffectivelytheresult):
thekeywordsMODELE,CHAM_MATERandEXCITaretherefore
uselessinthiscaseandtheyareignored
thesekeywordsmustbeusedonlyiftheinformationspassed
throughthemarenotalreadyavailableintheconceptgiven
byRESULTAT

DanieleColomboAnintroductiontoCode_Aster

Fieldnamemeaning

Whichisthemeaningofthefieldnamestobecalculated?
SIGM_ELNO_DEPL
Whatyouwanttocalculate
SIGM=stresstensor
Whereyouwanttocalculate
ELNO=nodesoftheelement
Fromwhichvaluesthecalculationhaveto
becarriedout
DEPL=fromthedisplacementfieldatnodes
DanieleColomboAnintroductiontoCode_Aster

Fieldnamemeaning

SIGM_XXXX_DEPL

ELGA,ELNO,NOEU
ELGA(elementgauss):thecalculationmustbedoneatthe
Gausspointsoftheelements
ELNO(elementnode):thecalculationmustbedoneatthe
nodesofeachelement,consideredseparatelyfromthe
neighbouringelements
morethanonevaluearecalculatedforeachnode,onevaluefromeach
elementsharingthatnode

NOEU(node):thecalculationmustbedoneateachnode
ameanvalueofthevaluescomingfromeachelementsharingthenode
iscalculated'
DanieleColomboAnintroductiontoCode_Aster

Fieldnamemeaning

ThedifferencebetweenthevaluescalculatedatELNOandthe
onescalculatedatNOEUisduetotheFEdiscretization:
SIGM_ELNO_DEPL:u
Onlythedisplacementsuarecontinuousacrosstheedges/facesof
twocontiguouselements
Strainsandstressesarecontinuousonlyinsideeachelement.

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

TryingtocalculateSIGM_NOEU_DEPLandEQUI_NOEU_SIGM
withoutfirstcalculatingthecorrespondingxxxx_ELNO_xxxxfields
makesCode_Asterissuingawarningandthecalculationisnot
performed:

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

Manyformatsaresupportedforoutput:IDEAS,MED,CASTEM,
GMSH,RESULTAT
IfFORMAT='RESULTAT'isused,theoutputwillbewritteninatextfile
bymeansofoneormoretables
Forexample,forSIGM_NOEU_DEPLfield,allthestresstensor
componentsateachnodeofthemesharewrittenintableformat:

DanieleColomboAnintroductiontoCode_Aster

Commandfilesyntax

FIN=endofthecommandfile
Eachcommandfilemustbeterminated
bythiscommand.

DanieleColomboAnintroductiontoCode_Aster

Documentation

Thecommandswehaveanalysedarethemostcommonand
basicones.
Ahugedocumentationdescribingallthecommandsandoptions
isavailableontheprojectwebsite:
http://www.codeaster.org
Therearethreetypesofdocuments:
DocU:userdocumentationforcommandsyntaxandoptions
DocR:referencedocumentationwheredetailedtechnical
informationsaboutdifferentsubjectsofthecodeareexplained
DocV:documentationofthevalidationtestcaseswherethe
testsusedtovalidateallthecommandsandoptionsofthecode
aredescribedindetails.
DanieleColomboAnintroductiontoCode_Aster

Documentation
Oraincomincianledolentinote,
afarmisisentire;orsonvenuto
ldovemoltopiantomipercuote.
Andnowbeginthedolefulnotestogrow
Audibleuntome;nowamIcome
Therewheremuchlamentationstrikesuponme.

DanteAlighieriDivineComedyhttp://en.wikipedia.org/wiki/Divina_commedia

ThedocumentationisinFrench.AnEnglishversionwillbeavailable
soon.
InthemeanwhileuseatranslatorsoftwarefromFrenchtoEnglish,
eveniftheresultisnotgoodasthetranslationabove.
AFrenchtoEnglishglossaryofCode_Asterabbreviationsis
availablehere:
http://www.codeaster.org/wiki/doku.php?id=en:p01_util:p120_terms
DanieleColomboAnintroductiontoCode_Aster

Documentation

Howthesyntaxofeachcommand(DocU)isexplained?
Forexample,fortheLIRE_MAILLAGEdocumentation:
acceptedkeywordvalues
concept

alternativemutual
exclusivekeywords
required
keywords.

typeoftheacceptedvalue

optional
keyword

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

ManyversionsofCode_Asterareavailableatthesametime.
Youalwayshavetwoversions:
anoperatingversion(atthemoment,version9)
Thisistheofficialreleasetobeusedfordailycalculations
Thefeaturesarefrozenandbugcorrectionsareguaranteed.

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

I'veinstalledandImaintainboththeoperatinganddevelopment
versionsofCode_Asteronthefollowingclusters:
RedQueen
Mace01

Herearethedetailsoftheavailableversions:
developmentversion:

NEW10
STA10
OLD10

(version10.2.6)
(version10.1.27)
(version10.1.0)

operatingversion:

NEW9
STA9

(version9.4.11)
(version9.4.0)

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

AllthesesoftwaresrununderLinux
AnunofficialportingofCode_AstertoWindowsisavailableatthe
followingaddress(I'venevertriedit):
http://www.necs.fr/gb/telechargement.php

AnofficialportingofSalometoWindowsisavailablefortestingat
thefollowingaddress:
http://files.salomeplatform.org/cea/adam/salomewindows/download/

DanieleColomboAnintroductiontoCode_Aster

Thankyouforyourattention!

DanieleColomboAnintroductiontoCode_Aster

You might also like