* fichier : formation_debutant_2_thermique.dgibi * *----------------------------------------------------------------------* * FORMATION DEBUTER AVEC CAST3M - CALCULS THERMO-MECANIQUES * * * * Modelisation du comportement thermo-mecanique d'une piece trouee * * * * Ce fichier est la partie 2 sur 3 de la formation debutant a Cast3M * * * * Partie 2 : calculs thermiques * * restitution des objets * * recuperation des zones maillees * * conduction, convection, rayonnement * * regimes stationnaires et transitoires * * creation d'une procedure Gibiane * * instructions conditionelles * * sauvegarde des objets * * * *----------------------------------------------------------------------* *----------------------------------------------------------------------* * R E S T I T U T I O N D E S O B J E T S * * * * R E S T O R I N G T H E O B J E C T S * *----------------------------------------------------------------------* OPTI 'REST' 'formation_debutant_1_maillage.sauv' ; REST ; itrac = FAUX ; ***OPTI 'TRAC' 'PSC' ; ipsc = EGA (VALE 'TRAC') 'PSC' ; *----------------------------------------------------------------------* * P A R M E T R E S D E C A L C U L * * * * C A L C U L A T I O N P A R M E T E R S * *----------------------------------------------------------------------* ** Parametres materiau / material parameters lambda = 50. ; cp = 420. ; rho = 7800. ; ** Parametres des conditions limites et chargement / * Parameters for boundary conditions and loading t0 = 0. ; timp = 250. ; fimp = -40000. ; simp = 2600.E3 ; hconv = 240. ; tconv = -80. ; emi = 0.9 ; trayo = -140. ; ** Instant final / Final time tfinal = 15000. ; *----------------------------------------------------------------------* * Chapitre / Chapter 2.1 * *----------------------------------------------------------------------* * C A L C U L T H E R M I Q U E * * conduction * * temperature + flux surfacique de chaleur imposes * * lineaire, stationnaire, materiau homogene * * * * T H E R M A L A N A L Y S I S * * conduction * * imposed temperature + surface heat flow * * linear, steady state, homogeneous material * *----------------------------------------------------------------------* ** Modele de conduction / Conduction model mot = MODE vol1 'THERMIQUE' 'CONDUCTION' ; mat = MATE mot 'K' lambda 'C' cp 'RHO' rho 'TINI' t0 ; ** Matrice de conductivite / Conductivity matix con = COND mot mat ; ** Recuperation de surfaces / * Recovery of some surfaces pt1 = env1 POIN 'PLAN' p1 p5 (0. 1. 0.) ; sut1 = env1 ELEM 'APPU' 'STRI' pt1 ; pint = env1 POIN 'CYLI' p6 p11 p7 ; sint = env1 ELEM 'APPU' 'STRI' pint ; SI itrac ; SI ipsc ; OPTI 'FTRA' '2.1_cl_flux.ps' ; FINSI ; TRAC 'FACE' (sut1 COUL 'ROUG') are1 ; SI ipsc ; OPTI 'FTRA' '2.1_cl_temperature.ps' ; FINSI ; TRAC 'FACE' (sint COUL 'BLEU') are1 ; SI ipsc ; OPTI 'FTRA' '2.1_cl_flux_temperature.ps' ; FINSI ; TRAC 'FACE' ((sut1 COUL 'ROUG') ET (sint COUL 'BLEU')) are1 ; FINSI ; ** Matrice de blocage / Boundary condition matrix blt = BLOQ 'T' sint ; ** Vecteur associe au blocage / * Vector associeted to the bc matrix pti = DEPI blt timp ; ** Vecteur flux impose a gauche / * Flow vector imposed on the left pfi = FLUX mot sut1 fimp ; ** Resolution / Solving t21 = RESO (con ET blt) (pti ET pfi) ; ** Affichage de la temperature / Display of the temperature SI ipsc ; OPTI 'FTRA' '2.1_temperatures.ps' ; FINSI ; SI itrac ; TRAC t21 vol1 ; TRAC t21 vol1 are1 ; FINSI ; liso1 = PROG 0. 'PAS' (timp / 15.) timp ; SI itrac ; TRAC t21 vol1 are1 liso1 ; FINSI ; *----------------------------------------------------------------------* * Chapitre / Chapter 2.2 * *----------------------------------------------------------------------* * C A L C U L T H E R M I Q U E * * conduction + convection * * temperature + flux surfacique + flux volumique de chaleur impose * * lineaire, stationnaire, materiau homogene * * * * T H E R M A L A N A L Y S I S * * conduction + convection * * imposed temperature + surface + volume heat flow * * linear, steady state, homogeneous material * *----------------------------------------------------------------------* ** Recuperation de volumes / * Recovery of some volumes x = COOR 1 vol1 ; ptso = x POIN 'COMPRIS' (0.33 * l) (0.51 * l) ; elso = vol1 ELEM 'APPU' 'STRI' ptso ; SI ipsc ; OPTI 'FTRA' '2.2_cl_source.ps' ; FINSI ; SI itrac ; TRAC 'FACE' (elso COUL 'VERT') are1 ; FINSI ; ** Source de chaleur psi = SOUR (REDU mot elso) simp elso ; ** Recuperation de surfaces / * Recovery of some surfaces z = COOR 3 env1 ; ptcon = z POIN 'EGAL' 0. ; sucon = env1 ELEM 'APPU' 'STRI' ptcon ; SI ipsc ; OPTI 'FTRA' '2.2_cl_convection.ps' ; FINSI ; SI itrac ; TRAC 'FACE' (sucon COUL 'TURQ') are1 ; FINSI ; ** Modele de convection / Convection model moc = MODE sucon 'THERMIQUE' 'CONVECTION' ; mac = MATE moc 'H' hconv ; ** Matrice de conductivite pour la convection / * Conductivity matrix for convection conh = COND moc mac ; ** Vecteur flux pour la convection / * Flow vector for convection chtc = MANU 'CHPO' sucon 'T' tconv ; ph = CONV moc mac chtc ; ** Resolution / Solving t22 = RESO (con ET conh ET blt) (pti ET pfi ET psi ET ph) ; ** Affichage de la temperature / Display of the temperature SI ipsc ; OPTI 'FTRA' '2.2_temperatures.ps' ; FINSI ; SI itrac ; TRAC t22 vol1 are1 ; FINSI ; *----------------------------------------------------------------------* * Chapitre / Chapter 3. * *----------------------------------------------------------------------* * C A L C U L T H E R M I Q U E * * conduction + convection * * temperature + flux surfacique + flux volumique de chaleur impose * * lineaire, transitoire, materiau homogene * * * * T H E R M A L A N A L Y S I S * * conduction + convection * * imposed temperature + surface + volume heat flow * * linear, transient, homogeneous material * *----------------------------------------------------------------------* ** Descriptions temporelles des chargements / * Time descriptions of the loads * 1) Temperature imposee / Imposed temperature list1 = PROG 0. (0.1 * tfinal) tfinal ; list2 = PROG (t0 / timp) 1. 1. ; evt1 = EVOL 'MANU' list1 list2 ; chatimp = CHAR 'TIMP' pti evt1 ; * 2) Flux surfacique impose / Imposed surface flow list3 = PROG 0. (0.3 * tfinal) (0.5 * tfinal) tfinal ; list4 = PROG 0. 0. 1. 1. ; evt2 = EVOL 'MANU' list3 list4 ; chafimp = CHAR 'Q' pfi evt2 ; * 3) Source volumique / Volume source chasour = CHAR 'Q' psi evt2 ; * 4) Convection chaconv = CHAR 'TECO' chtc ; ** Resolution avec la procedure PASAPAS / * Solving with the PASAPAS procedure delta_t = tfinal / 100. ; tab1 = TABL ; tab1 . 'MODELE' = mot ET moc ; tab1 . 'CARACTERISTIQUES' = mat ET mac ; tab1 . 'BLOCAGES_THERMIQUES' = blt ; tab1 . 'CHARGEMENT' = chatimp ET chafimp ET chasour ET chaconv ; tab1 . 'TEMPS_CALCULES' = PROG 0. 'PAS' delta_t tfinal ; PASAPAS tab1 ; ** Post traitement / Post processing * 1) Evolution temporelle temperature en 4 noeuds / * Time evolution of temperature on 4 nodes pa = vol1 POIN 'PROC' (0. (e / 2.) 0.) ; pb = vol1 POIN 'PROC' ((0.45 * l) (e / 2.) h ) ; pc = vol1 POIN 'PROC' ((0.8 * l) (e / 2.) (h / 2.)) ; pd = vol1 POIN 'PROC' ((l + (h / 2.)) (e / 2.) (h / 2.)) ; SI ipsc ; OPTI 'FTRA' '3_points.ps' ; FINSI ; SI itrac ; TRAC (are1 ET (pa ET pb ET pc ET pd)) ; FINSI ; eva = EVOL 'BLEU' 'TEMP' tab1 'TEMPERATURES' 'T' pa ; evb = EVOL 'VERT' 'TEMP' tab1 'TEMPERATURES' 'T' pb ; evc = EVOL 'ORAN' 'TEMP' tab1 'TEMPERATURES' 'T' pc ; evd = EVOL 'ROUG' 'TEMP' tab1 'TEMPERATURES' 'T' pd ; SI ipsc ; OPTI 'FTRA' '3_evol_temperatures.ps' ; FINSI ; SI itrac ; DESS (eva ET evb ET evc ET evd) ; FINSI ; * 2) Boucle : trace des temperature a chaque instant * Loop: plotting temperature for each time step SI ipsc ; OPTI 'FTRA' '3_temperatures.ps' ; FINSI ; n1 = DIME (tab1 . 'TEMPERATURES') ; REPE b1 n1 ; ti = tab1 . 'TEMPERATURES' . (&b1 - 1) ; tpsi = tab1 . 'TEMPS' . (&b1 - 1) ; prc = ENTI (100. * tpsi / tfinal) ; titi = CHAI '[3] Temperature au temps' ' ' tpsi ' (' prc ' %)' ; SI itrac ; TRAC ti vol1 are1 liso1 'TITR' titi ; FINSI ; FIN b1 ; *----------------------------------------------------------------------* * Chapitre / Chapter 4. * *----------------------------------------------------------------------* * P R O C E D U R E * * affichage du vecteur flux de chaleur * * * * displaying the heat flow vector * *----------------------------------------------------------------------* DEBP VECFLU chpo1*'CHPOINT' model1*'MMODEL' mater1*'MCHAML' ; * Gradient de temperature / Gradient of temperature grad1 = GRAD chpo1 model1 ; * Changement du type / Type change grad2 = CHAN 'TYPE' grad1 'CARACTERISTIQUES' ; * Multiplication par la conductivite / Multiplication by the conductivity q = mater1 * grad2 (MOTS 'K ' 'K ' 'K ') (MOTS 'T,X' 'T,Y' 'T,Z') (MOTS 'QX' 'QY' 'QZ') ; q = -1. * q ; * Objet vecteur / Vector object vec1 = VECT q model1 (MOTS 'QX' 'QY' 'QZ') 2.E-7 ; q = CHAN 'CHPO' q model1 ; vec1 = @VECOUL q 2.E-7 (MOTS 'QX' 'QY' 'QZ') ; FINP vec1 ; ** Utilisation de cette procedure / Using this procedure tn1 = tab1 . 'TEMPERATURES' . (n1 - 1) ; vf1 = VECFLU tn1 mot mat ; SI ipsc ; OPTI 'FTRA' '4_flux.ps' ; FINSI ; SI itrac ; TRAC vf1 are1 ; FINSI ; ** Trace avec lignes d'isovaleurs / * Plotting with iso-value lines SI ipsc ; OPTI 'FTRA' '4_temperatures.ps' ; FINSI ; SI itrac ; OPTI 'ISOV' 'LIGN' ; TRAC tn1 vol1 are1 10 ; OPTI 'ISOV' 'SURF' ; FINSI ; *----------------------------------------------------------------------* * Chapitre / Chapter 5. * *----------------------------------------------------------------------* * C A L C U L T H E R M I Q U E * * conduction + convection + rayonnement * * temperature + flux surfacique + flux volumique de chaleur impose * * non lineaire, transitoire, materiau homogene * * * * T H E R M A L A N A L Y S I S * * conduction + convection + radiation * * imposed temperature + surface + volume heat flow * * non linear, transient, homogeneous material * *----------------------------------------------------------------------* SI ipsc ; OPTI 'FTRA' '5_cl_rayonnement.ps' ; FINSI ; SI itrac ; TRAC 'FACE' (sur2 COUL 'ROSE') are1 'TITR' '[5] Surface avec rayonnement' ; FINSI ; ** Modele de rayonnement / Radiation model mor = MODE sur2 'THERMIQUE' 'RAYONNEMENT' 'INFINI' ; mar = MATE mor 'EMIS' emi ; ** Chargement de rayonnement / Radiation load chtr = MANU 'CHPO' sur2 'T' trayo ; charay = CHAR 'TERA' chtr ; ** Resolution avec la procedure PASAPAS / * Solving with the PASAPAS procedure tab1 = TABL ; tab1 . 'MODELE' = mot ET moc ET mor ; tab1 . 'CARACTERISTIQUES' = mat ET mac ET mar ; tab1 . 'BLOCAGES_THERMIQUES' = blt ; tab1 . 'CHARGEMENT' = chatimp ET chafimp ET chasour ET chaconv ET charay ; tab1 . 'TEMPS_CALCULES' = PROG 0. 'PAS' delta_t tfinal ; tab1 . 'CELSIUS' = VRAI ; PASAPAS tab1 ; ** Post traitement / Post processing * 1) evolution temporelle de la temperature en 4 noeuds / * Time evolution of temperature on 4 nodes evar = EVOL 'BLEU' 'TEMP' tab1 'TEMPERATURES' 'T' pa ; evbr = EVOL 'VERT' 'TEMP' tab1 'TEMPERATURES' 'T' pb ; evcr = EVOL 'ORAN' 'TEMP' tab1 'TEMPERATURES' 'T' pc ; evdr = EVOL 'ROUG' 'TEMP' tab1 'TEMPERATURES' 'T' pd ; tleg = TABL ; tleg . 1 = 'TIRR' ; tleg . 2 = 'TIRR' ; tleg . 3 = 'TIRR' ; tleg . 4 = 'TIRR' ; tleg . 'TITRE' = TABL ; tleg . 'TITRE' . 1 = 'PA cond.' ; tleg . 'TITRE' . 2 = 'PB cond.' ; tleg . 'TITRE' . 3 = 'PC cond.' ; tleg . 'TITRE' . 4 = 'PD cond.' ; tleg . 'TITRE' . 5 = 'PA cond. + ray.' ; tleg . 'TITRE' . 6 = 'PB cond. + ray.' ; tleg . 'TITRE' . 7 = 'PC cond. + ray.' ; tleg . 'TITRE' . 8 = 'PD cond. + ray.' ; SI ipsc ; OPTI 'FTRA' '5_evol_temperatures.ps' ; FINSI ; SI itrac ; DESS (eva ET evb ET evc ET evd ET evar ET evbr ET evcr ET evdr) 'LEGE' tleg ; FINSI ; * 2) Boucle : trace des temperature a chaque instant / * Loop: plotting temperature for each time step SI ipsc ; OPTI 'FTRA' '5_temperatures.ps' ; FINSI ; n1 = DIME (tab1 . 'TEMPERATURES') ; REPE b1 n1 ; ti = tab1 . 'TEMPERATURES' . (&b1 - 1) ; tpsi = tab1 . 'TEMPS' . (&b1 - 1) ; prc = ENTI (100. * tpsi / tfinal) ; titi = CHAI '[5] Temperature au temps' ' ' tpsi ' (' prc ' %)' ; SI itrac ; TRAC ti vol1 are1 liso1 'TITR' titi ; FINSI ; FIN b1 ; * 3) Boucle : trace du vecteur flux de chaleur a chaque instant / * Loop: plotting the heat flow vector at each time step SI ipsc ; OPTI 'FTRA' '5_flux.ps' ; FINSI ; REPE b1 n1 ; ti = tab1 . 'TEMPERATURES' . (&b1 - 1) ; vfi = VECFLU ti mot mat ; tpsi = tab1 . 'TEMPS' . (&b1 - 1) ; prc = ENTI (100. * tpsi / tfinal) ; titi = CHAI '[5] Flux au temps' ' ' tpsi ' (' prc ' %)' ; SI itrac ; TRAC vfi are1 'TITR' titi ; FINSI ; FIN b1 ; *----------------------------------------------------------------------* * S A U V E G A R D E D E S O B J E T S * * * * S A V I N G T H E O B J E C T S * *----------------------------------------------------------------------* OPTI 'SAUV' 'formation_debutant_2_thermique.sauv' ; SAUV ; FIN ;