Sei sulla pagina 1di 19

DEBER EJERCICIO 6.

1
MARCO NAVARRETE

ELEMENTOS FINITOS

CAPTURAS
CÓDIGO
*DIM,EX61RESULTS,ARRAY,6,5,1 ! Create a 6x5x1 array named “ex61results”
/FILNAME,MARCONAVARRETE6-1-mesh1 ! Change the jobname to Exercise6-1-mesh1
/PREP7 ! Enter the Preprocessor
BLC4,0,0,0.15,0.10 ! Create 0.15x0.1 m rectangle w/corner at (0,0)
BLC5,0.075,0.05,0.04,0.04 ! Create 0.04x0.04 m rect. center at (0.075,0.05)
ADELE,ALL ! Delete areas only; leave lines and keypoints
LFILLT,5,6,0.003 ! Create 0.003 m fillet between Lines 5 and 6
LFILLT,6,7,0.003 ! Create 0.003 m fillet between Lines 6 and 7
LFILLT,7,8,0.003 ! Create 0.003 m fillet between Lines 7 and 8
LFILLT,8,5,0.003 ! Create 0.003 m fillet between Lines 8 and 5
AL,ALL ! Create an area from all lines in the model
ET,1,PLANE55 ! Use PLANE55 elements
MP,KXX,1,40 ! Define thermal conductivity for material #1
AMESH,ALL ! Mesh all areas in the model
*GET,ex61results(1,1),ELEM,,NUM,MAX ! Retrieve the maximum element number
/SOLU ! Enter the Solution processor
LSEL,S,LOC,X,0 ! Select line at x=0
DL,ALL,,TEMP,400, ! Apply Temperature constraint of 400 C to line
LSEL,S,LOC,X,0.15 ! Select line at x=0.15
DL,ALL,,TEMP,300, ! Apply Temperature constraint of 300 C to line
ALLSEL ! Select everything
SOLVE ! Solve the model
SAVE ! Save the database
FINISH ! Exit the Solution Processor
/FILNAME,MARCONAVARRETE6-1-mesh2 ! Change the jobname to Exercise6-1-mesh2
/PREP7 ! Enter the Preprocessor
ACLEAR,ALL ! Clear all area meshes
SMRT,5 ! Use a Smart Size of 5
AMESH,ALL ! Mesh all areas in the model
*GET,ex61results(2,1),ELEM,,NUM,MAX ! Retrieve the maximum element number
/SOL ! Enter the Solution processor
ALLSEL,ALL ! Select everything
SOLVE ! Solve the model
SAVE ! Save the database
FINISH ! Exit the Solution Processor
/FILNAME,MARCONAVARRETE6-1-mesh3 ! Change the jobname to Exercise6-1-mesh3
/PREP7 ! Enter the Preprocessor
ACLEAR,ALL ! Clear all area meshes
SMRT,3 ! Use a Smart Size of 3
AMESH,ALL ! Mesh all areas in the model
*GET,ex61results(3,1),ELEM,,NUM,MAX ! Retrieve the maximum element number
/SOL ! Enter the Solution processor
ALLSEL,ALL ! Select everything
SOLVE ! Solve the model
SAVE ! Save the database
FINISH ! Exit the Solution Processor
/FILNAME,MARCONAVARRETE6-1-mesh4 ! Change the jobname to Exercise6-1-mesh4
/PREP7 ! Enter the Preprocessor
ACLEAR,ALL ! Clear all area meshes
SMRT,1 ! Use a Smart Size of 1
AMESH,ALL ! Mesh all areas in the model
*GET,ex61results(4,1),ELEM,,NUM,MAX ! Retrieve the maximum element number
/SOL ! Enter the Solution processor
ALLSEL,ALL ! Select everything
SOLVE ! Solve the model
SAVE ! Save the database
FINISH ! Exit the Solution Processor
/FILNAME,MARCONAVARRETE6-1-mesh5 ! Change the jobname to Exercise6-1-mesh5
/PREP7 ! Enter the Preprocessor
LSEL,S,LOC,X,0.05,0.10 ! Select lines between x=0.05 and x=0.10
LSEL,R,LOC,Y,0.025,0.075 ! Also select lines between y=0.025 and 0.075
LREFINE,ALL,,,1 ! Level 1 refinement for all selected lines
*GET,ex61results(5,1),ELEM,,NUM,MAX ! Retrieve the maximum element number
/SOL ! Enter the Solution processor
ALLSEL,ALL ! Select everything
SOLVE ! Solve the model
SAVE ! Save the database
FINISH ! Exit the Solution Processor
/FILNAME,MARCONAVARRETE6-1-mesh6 ! Change the jobname to Exercise6-1-mesh6
/PREP7 ! Enter the Preprocessor
ACLEAR,ALL ! Clear all area meshes
SMRT,1 ! Use a Smart Size of 1
AMESH,ALL ! Mesh all areas in the model
EREF,ALL,,,1 ! Level 1 refinement for all elements
*GET,ex61results(6,1),ELEM,,NUM,MAX ! Retrieve the maximum element number
/SOL ! Enter the Solution processor
ALLSEL,ALL ! Select everything
SOLVE ! Solve the model
SAVE ! Save the database
FINISH ! Exit the Solution processor
PARSAVE,ALL, 'MARCONAVARRETE6-1-Parameters' ! Save all parameters in the model
/CLEAR
/FILNAME,MARCONAVARRETE6-1-mesh1 ! Change the jobname to Exercise6-1-mesh1
RESUME ! Resume the database
PARRES,CHANGE,'Exercise6-1-Parameters' ! Load the array parameters
/POST1 ! Enter the General Postprocessor
PLNSOL,TEMP,,0 ! Plot the nodal temperature
PLNSOL,TF,SUM,0 ! Plot the nodal thermal flux
*GET,ex61results(1,2),PLNSOL,,MAX ! Retrieve the max nodal thermal flux
PLESOL,TF,SUM,0 ! Plot the element thermal flux
*GET,ex61results(1,3),PLNSOL,,MAX ! Retrieve the max element thermal flux
*GET,ex61results(1,4),PRERR,,TEPC ! Retrieve thermal energy percent error
/GRAPHICS,OFF ! Turn Power Graphics off
PLESOL,TERR,,0 ! Plot the thermal energy error
*GET,ex61results(1,5),PLNSOL,,MAX ! Retrieve the max thermal energy error
PARSAVE,ALL,'MARCONAVARRETE6-1-Parameters' ! Save all parameters in the model
FINISH ! Exit the Postprocessor
/CLEAR
/FILNAME,MARCONAVARRETE6-1-mesh2 ! Change the jobname to Exercise6-1-mesh2
RESUME ! Resume the database
PARRES,CHANGE,'MARCONAVARRETE6-1-Parameters' ! Load the array parameters
/POST1 ! Enter the General Postprocessor
PLNSOL,TEMP,,0 ! Plot the nodal temperature
PLNSOL,TF,SUM,0 ! Plot the nodal thermal flux
*GET,ex61results(2,2),PLNSOL,,MAX ! Retrieve the max nodal thermal flux
PLESOL,TF,SUM,0 ! Plot the element thermal flux
*GET,ex61results(2,3),PLNSOL,,MAX ! Retrieve the max element thermal flux
*GET,ex61results(2,4),PRERR,,TEPC ! Retrieve thermal energy percent error
/GRAPHICS,OFF ! Turn Power Graphics off
PLESOL,TERR,,0 ! Plot the thermal energy error
*GET,ex61results(2,5),PLNSOL,,MAX ! Retrieve the max thermal energy error
PARSAVE,ALL,'MARCONAVARRETE6-1-Parameters' ! Save all parameters in the model
FINISH ! Exit the Postprocessor
/CLEAR
/FILNAME,MARCONAVARRETE6-1-mesh3 ! Change the jobname to Exercise6-1-mesh3
RESUME ! Resume the database
PARRES,CHANGE,'MARCONAVARRETE6-1-Parameters' ! Load the array parameters
/POST1 ! Enter the General Postprocessor
PLNSOL,TEMP,,0 ! Plot the nodal temperature
PLNSOL,TF,SUM,0 ! Plot the nodal thermal flux
*GET,ex61results(3,2),PLNSOL,,MAX ! Retrieve the max nodal thermal flux
PLESOL,TF,SUM,0 ! Plot the element thermal flux
*GET,ex61results(3,3),PLNSOL,,MAX ! Retrieve the max element thermal flux
*GET,ex61results(3,4),PRERR,,TEPC ! Retrieve thermal energy percent error
/GRAPHICS,OFF ! Turn Power Graphics off
PLESOL,TERR,,0 ! Plot the thermal energy error
*GET,ex61results(3,5),PLNSOL,,MAX ! Retrieve the max thermal energy error
PARSAVE,ALL,'MARCONAVARRETE6-1-Parameters' ! Save all parameters in the model
FINISH ! Exit the Postprocessor
/CLEAR
/FILNAME,MARCONAVARRETE6-1-mesh4 ! Change the jobname to Exercise6-1-mesh4
RESUME ! Resume the database
PARRES,CHANGE,'MARCONAVARRETE6-1-Parameters' ! Load the array parameters
/POST1 ! Enter the General Postprocessor
PLNSOL,TEMP,,0 ! Plot the nodal temperature
PLNSOL,TF,SUM,0 ! Plot the nodal thermal flux
*GET,ex61results(4,2),PLNSOL,,MAX ! Retrieve the max nodal thermal flux
PLESOL,TF,SUM,0 ! Plot the element thermal flux
*GET,ex61results(4,3),PLNSOL,,MAX ! Retrieve the max element thermal flux
*GET,ex61results(4,4),PRERR,,TEPC ! Retrieve thermal energy percent error
/GRAPHICS,OFF ! Turn Power Graphics off
PLESOL,TERR,,0 ! Plot the thermal energy error
*GET,ex61results(4,5),PLNSOL,,MAX ! Retrieve the max thermal energy error
PARSAVE,ALL,'MARCONAVARRETE6-1-Parameters' ! Save all parameters in the model
FINISH ! Exit the Postprocessor
/CLEAR
/FILNAME,MARCONAVARRETE6-1-mesh5 ! Change the jobname to Exercise6-1-mesh5
RESUME ! Resume the database
PARRES,CHANGE,'MARCONAVARRETE6-1-Parameters' ! Load the array parameters
/POST1 ! Enter the General Postprocessor
PLNSOL,TEMP,,0 ! Plot the nodal temperature
PLNSOL,TF,SUM,0 ! Plot the nodal thermal flux
*GET,ex61results(5,2),PLNSOL,,MAX ! Retrieve the max nodal thermal flux
PLESOL,TF,SUM,0 ! Plot the element thermal flux
*GET,ex61results(5,3),PLNSOL,,MAX ! Retrieve the max element thermal flux
*GET,ex61results(5,4),PRERR,,TEPC ! Retrieve thermal energy percent error
/GRAPHICS,OFF ! Turn Power Graphics off
PLESOL,TERR,,0 ! Plot the thermal energy error
*GET,ex61results(5,5),PLNSOL,,MAX ! Retrieve the max thermal energy error
PARSAVE,ALL,'MARCONAVARRETE6-1-Parameters' ! Save all parameters in the model
FINISH ! Exit the Postprocessor
/CLEAR
/FILNAME,MARCONAVARRETE6-1-mesh6 ! Change the jobname to Exercise6-1-mesh6
RESUME ! Resume the database
PARRES,CHANGE,'MARCONAVARRETE6-1-Parameters' ! Load the array parameters
/POST1 ! Enter the General Postprocessor
PLNSOL,TEMP,,0 ! Plot the nodal temperature
PLNSOL,TF,SUM,0 ! Plot the nodal thermal flux
*GET,ex61results(6,2),PLNSOL,,MAX ! Retrieve the max nodal thermal flux
PLESOL,TF,SUM,0 ! Plot the element thermal flux
*GET,ex61results(6,3),PLNSOL,,MAX ! Retrieve the max element thermal flux
*GET,ex61results(6,4),PRERR,,TEPC ! Retrieve thermal energy percent error
/GRAPHICS,OFF ! Turn Power Graphics off
PLESOL,TERR,,0 ! Plot the thermal energy error
*GET,ex61results(6,5),PLNSOL,,MAX ! Retrieve the max thermal energy error
PARSAVE,ALL,'MARCONAVARRETE6-1-Parameters' ! Save all parameters in the model
FINISH ! Exit the Postprocessor
/POST26 ! Enter the Time History Postprocessor
STORE,ALLOC,6 ! Store data for 6 variables
VPUT,ex61results(1,1),1 ! Move vector 1 into the variable
VPUT,ex61results(1,2),2 ! Move vector 2 into the variable
VPUT,ex61results(1,3),3 ! Move vector 3 into the variable
VPUT,ex61results(1,5),5 ! Move vector 5 into the variable
XVAR,1 ! Specify the x variable for the graph
PLVAR,2,3 ! Specify the y variables and graph
XVAR,1 ! Specify the x variable for the graph
PLVAR,5 ! Specify the y variable and graph
! Write the parameter array to an external file
*CREATE,ansuitmp ! Create a command macro file
*CFOPEN,'Ex61Results','txt', ! Open a command file
*VWRITE,ex61results(1,1),ex61results(1,2),ex61results(1,3),ex61results(1,4),
ex61results(1,5),,,, ! Write the data to a file
(5F14.6) ! With this format sequence
*CFCLOS ! Close the command file
*END ! Close the macro file
/INPUT,ansuitmp ! Run the macro file
FINISH ! Finish and Exit Postprocessor
!/EXIT ! Exit ANSYS

CONCLUSIONES
La Tabla muestra los cinco parámetros de interés de los seis modelos creados para este ejercicio.
Debido a que cada operación de malla crea una malla ligeramente diferente, sus modelos
pueden tener Resultados ligeramente diferentes. Las versiones anteriores de ANSYS pueden
producir resultados sustancialmente diferentes, especialmente para las mallas más gruesas.
Estos resultados pueden evaluarse desde cuatro perspectivas diferentes. Primero, puedes
calcular el diferencia porcentual entre los resultados nodales y de elementos para cada uno de
los seis modelos (utilizando la solución nodal como base) como medida de la continuidad de la
solución: ((elemento nodal) / nodal). Estos cálculos se muestran en el lado derecho de la Tabla.
Segundo, si asumes eso los resultados nodales del modelo con la malla más fina representan la
solución 'verdadera', puede calcule la diferencia porcentual entre los resultados del mejor
modelo y el otro modelos como medida de la calidad de la solución ((fina-gruesa) / fina). Estos
cálculos tanto para los resultados nodales y de elementos se muestran en la segunda tabla. En
tercer lugar, puede comparar el TEPC con el Límite del 5% propuesto en la literatura. Finalmente,
puede ver si los TERR máximos tienden hacia cero.

Potrebbero piacerti anche