.. _d7.01.01-objectif: Objective of the exercise ====================== It is proposed to create a new option that allows the calculation of the average stress per cell. Here is the intended use case: .. code-block:: python RESU = CALC_CHAMP (reuse= RESU, RESULTAT = RESU, NUME_ORDRE =1, CONTRAINTE =( "SIGM_ELEM ")) IMPR_RESU (RESU =_F (RESULTAT = RESU, NOM_CHAM =( "SIGM_ELEM ")), UNITE =8, FORMAT =" RESULTAT ") A copy of the sslv04a test case, corresponding to tpdev02a, is used for this exercise. A test case should be: - small in size (a few seconds of time CPU, mesh with the minimum number of meshes); - easy to understand (few lines) and should cover a single feature (*elementary test*), all configurations and keywords; - example: should not trigger alarms (by default, an alarm in a test case produced an error); - documented: in the validation manual. This test is a 45 degree section of a pipe under internal pressure, for which there is an analytical reference, see [:external:ref:`V3.04.004 `]. Here is the command file to complete: .. code-block:: py DEBUT (CODE =_F (NIV_PUB_WEB =" INTERNET "), DEBUG =_F (SDVERI =" OUI ")) M = LIRE_MAILLAGE (FORMAT =" MED ") DEFI_GROUP (reuse=M, MAILLAGE =M, CREA_GROUP_NO =_F (NOM =" DIRI ", GROUP_MA =" DIRI ")) MO = AFFE_MODELE (MAILLAGE =M, AFFE =_F (TOUT =" OUI ", PHENOMENE =" MECANIQUE ", MODELISATION ="3D")) MA = DEFI_MATERIAU (ELAS =_F (E=200000.0, NU=0.3, ALPHA =0.0)) CM = AFFE_MATERIAU (MAILLAGE =M, AFFE =_F (TOUT =" OUI ", MATER =MA)) CH = AFFE_CHAR_MECA ( MODELE =ME, DDL_IMPO =( _F (GROUP_NO =" DIRI ", DY=0.0), _F (GROUP_NO ="F", DZ=0.0)), FACE_IMPO =_F (GROUP_MA =" DNOR ", DNOR =0.0), PRES_REP =_F (GROUP_MA =" PRES ", PRES =60.0), ) RESU = MECA_STATIQUE (MODELE =MO, CHAM_MATER =CM, EXCIT =_F (CHARGE =CH)) CALC_CHAMP (reuse= RESU, RESULTAT = RESU, #... ) TEST_RESU ( RESU =( _F ( NUME_ORDRE =1, RESULTAT = RESU, NOM_CHAM =" SIGM_ELEM ", NOM_CMP =" SIXX ", #... ), _F ( NUME_ORDRE =1, RESULTAT = RESU, NOM_CHAM =" SIGM_ELEM ", NOM_CMP =" SIYY ", #... ), _F ( NUME_ORDRE =1, RESULTAT = RESU, NOM_CHAM =" SIGM_ELEM ", NOM_CMP =" SIZZ ", #... ), _F ( NUME_ORDRE =1, RESULTAT = RESU, NOM_CHAM =" SIGM_ELEM ", NOM_CMP =" SIXY ", #... ), _F ( NUME_ORDRE =1, RESULTAT = RESU, NOM_CHAM =" SIGM_ELEM ", NOM_CMP =" SIXZ ", #... ), _F ( NUME_ORDRE =1, RESULTAT = RESU, NOM_CHAM =" SIGM_ELEM ", NOM_CMP =" SIYZ ", #... ), ) ) IMPR_RESU (FORMAT =" MED ", RESU =_F (MAILLAGE =M, RESULTAT = RESU)) FIN ()