Welcome to the forums. Please post in English or French.

You are not logged in.

#1 2013-07-16 13:30:32

Ivp
Member
Registered: 2011-06-03
Posts: 113

[SOLVED]Crea_champ: Operation Disc

Hello to everyone,

I try to change the discretization of a field using the command CREA_CHAMP (OPERATION='DISC').
In fact, I want to convert a field in nodes in a field in elements (ELNO)

MN[i]=CREA_CHAMP(TYPE_CHAM='NOEU_VAR2_R',
                 OPERATION='ASSE',
                 MAILLAGE=Malla1,
                 ASSE=(
                 _F(TOUT='OUI',
                    CHAM_GD=Ch1[i],
                    NOM_CMP=('DX','DY',),
                    NOM_CMP_RESU=('V1','V2',),),
                 _F(TOUT='OUI',
                    CHAM_GD=Ch2[i],
                    NOM_CMP=('DX','DY',),
                    NOM_CMP_RESU=('V3','V4',),),),);

ME[i]=CREA_CHAMP(TYPE_CHAM='ELNO_VARI_R',
               OPERATION='DISC',
                 MODELE=M_Term,
               CHAM_GD=MN[i],);

When I run the model, this error appears:

!---------------------------------------------------------------------------------!
   ! <EXCEPTION> <UTILITAI3_23>                                                      !
   !                                                                                 !
   ! Erreur :                                                                        !
   !   Aucun élément fini du ligrel 'M_Term  .MODELE' ne sait calculer le            !
   !   paramètre: PVARI_R de l'option:  TOU_INI_ELNO.                                !
   !   Le champ par éléments que l'on veut créer est vide. On ne peut pas continuer. !
   !---------------------------------------------------------------------------------!

I would like to know if somebody has an explanation or solution.
I attach the .mess file in order to you can watch the complete code.

As curiosity, I use this code in a 2D model and no problem appears.

I look forward to receiving news.
Best regards

Last edited by Ivp (2013-07-16 17:44:25)


Attachments:
Caso_Mec.mess, Size: 97.7 KiB, Downloads: 240

Offline

#2 2013-07-16 13:39:24

delmas
Administrator
From: EDF R&D
Registered: 2007-12-12
Posts: 837

Re: [SOLVED]Crea_champ: Operation Disc

Why do you use a thermic model ? Try a mechanical model.


Code_Aster release : unstable on (Ubuntu Precise Pangolin 12.04 64 bits) - GNU + Intel

Code_Aster. What else ?

Offline

#3 2013-07-16 17:43:35

Ivp
Member
Registered: 2011-06-03
Posts: 113

Re: [SOLVED]Crea_champ: Operation Disc

delmas wrote:

Why do you use a thermic model ? Try a mechanical model.

You're right. With mechanical model, there is no problem.

I used a thermal model because the field of internal variables is in fact the metallurgical field.

Best regards

Offline

#4 2021-10-04 21:01:37

rodrigofarias
Member
Registered: 2020-09-03
Posts: 61

Re: [SOLVED]Crea_champ: Operation Disc

Ivp wrote:
delmas wrote:

Why do you use a thermic model ? Try a mechanical model.

You're right. With mechanical model, there is no problem.

I used a thermal model because the field of internal variables is in fact the metallurgical field.

Best regards

Hi, Im having the same problem trying to solve the testcase MTLP100b. Its a 3D thermo-metallurgical transient problem.
What modifications you did in your original model to solve this error? Thanks.

Offline

#5 2021-10-05 16:53:53

Ivp
Member
Registered: 2011-06-03
Posts: 113

Re: [SOLVED]Crea_champ: Operation Disc

rodrigofarias wrote:
Ivp wrote:
delmas wrote:

Why do you use a thermic model ? Try a mechanical model.

You're right. With mechanical model, there is no problem.

I used a thermal model because the field of internal variables is in fact the metallurgical field.

Best regards

Hi, Im having the same problem trying to solve the testcase MTLP100b. Its a 3D thermo-metallurgical transient problem.
What modifications you did in your original model to solve this error? Thanks.

Hello,

I used a mechanical model to change the discretization of the NOEU field. Then, the ELNO field generated was introduced in a thermal resultat concept using CREA_RESU:

        Ch1=CREA_CHAMP(TYPE_CHAM='NOEU_DEPL_R',
                                        OPERATION='EXTR',
                                        RESULTAT=Resu1,
                                        NOM_CHAM='DEPL',
                                        INST=Tiempos[i],);

	Ch2=CREA_CHAMP(TYPE_CHAM='NOEU_DEPL_R',
                                        OPERATION='EXTR',
                                        RESULTAT=Resu2,
                                        NOM_CHAM='DEPL',
                                        INST=Tiempos[i],);

	MN=CREA_CHAMP(TYPE_CHAM='NOEU_VAR2_R',
                                       OPERATION='ASSE',
                                       MAILLAGE=Malla,
                                       ASSE=(
                                                  _F(TOUT='OUI',
                                                        CHAM_GD=Ch1,
                                                        NOM_CMP=('DX','DY',),
                                                        NOM_CMP_RESU=('V1','V2',),),
                                                  _F(TOUT='OUI',
                                                        CHAM_GD=Ch2,
                                                        NOM_CMP=('DX','DY',),
                                                        NOM_CMP_RESU=('V3','V4',),),),);

	ME=CREA_CHAMP(TYPE_CHAM='ELNO_VARI_R',
                                      OPERATION='DISC',
                                      MODELE=M_Mec_3D,
                                      CHAM_GD=MN,);

	PMetEnfr = CREA_RESU(OPERATION='AFFE', 
		 		               TYPE_RESU='EVOL_THER', 
		 		               NOM_CHAM='META_ELNO', 
		 		               AFFE=_F(CHAM_GD=ME, INST=Tiempos[i],),);

Best regards

Offline

#6 2021-10-06 13:49:41

rodrigofarias
Member
Registered: 2020-09-03
Posts: 61

Re: [SOLVED]Crea_champ: Operation Disc

Ivp wrote:

Hello,

I used a mechanical model to change the discretization of the NOEU field. Then, the ELNO field generated was introduced in a thermal resultat concept using CREA_RESU:

        Ch1=CREA_CHAMP(TYPE_CHAM='NOEU_DEPL_R',
                                        OPERATION='EXTR',
                                        RESULTAT=Resu1,
                                        NOM_CHAM='DEPL',
                                        INST=Tiempos[i],);

	Ch2=CREA_CHAMP(TYPE_CHAM='NOEU_DEPL_R',
                                        OPERATION='EXTR',
                                        RESULTAT=Resu2,
                                        NOM_CHAM='DEPL',
                                        INST=Tiempos[i],);

	MN=CREA_CHAMP(TYPE_CHAM='NOEU_VAR2_R',
                                       OPERATION='ASSE',
                                       MAILLAGE=Malla,
                                       ASSE=(
                                                  _F(TOUT='OUI',
                                                        CHAM_GD=Ch1,
                                                        NOM_CMP=('DX','DY',),
                                                        NOM_CMP_RESU=('V1','V2',),),
                                                  _F(TOUT='OUI',
                                                        CHAM_GD=Ch2,
                                                        NOM_CMP=('DX','DY',),
                                                        NOM_CMP_RESU=('V3','V4',),),),);

	ME=CREA_CHAMP(TYPE_CHAM='ELNO_VARI_R',
                                      OPERATION='DISC',
                                      MODELE=M_Mec_3D,
                                      CHAM_GD=MN,);

	PMetEnfr = CREA_RESU(OPERATION='AFFE', 
		 		               TYPE_RESU='EVOL_THER', 
		 		               NOM_CHAM='META_ELNO', 
		 		               AFFE=_F(CHAM_GD=ME, INST=Tiempos[i],),);

Best regards

First, thank you for responding on an eight year post!

I'm having a little trouble understanding the calculation sequence. Did your simulation have a mechanical step too?
My simulation is only thermal (transient), using the THER_NON_LINE operator. Heres a code snippet:

...
model = AFFE_MODELE(AFFE=_F(MODELISATION=('3D', ),
	                         PHENOMENE='THERMIQUE',
	                         TOUT='OUI'),
	                         MAILLAGE=mesh)

rter_0 = THER_NON_LINE(CHAM_MATER=fmat,
                       ETAT_INIT=_F(VALE=25.0),
                       INCREMENT=_F(LIST_INST=tim[0],
                        INST_INIT=0,
                        INST_FIN=dt),
                       MODELE=model,
                       COMPORTEMENT=_F(RELATION='THER_NL',.....

PHASINIT = CREA_CHAMP(AFFE=_F(NOM_CMP=('V1', 'V2', 'V3', 'V4', 'V5', 'V6', 'V7'),
                              TOUT='OUI',
                              VALE=(0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 11.0)), 
                      MAILLAGE=mesh,
                      OPERATION='AFFE',
                      TYPE_CHAM='CART_VAR2_R')

rter_0 = CALC_META(reuse=rter_0,
                CHAM_MATER=fmat,
                COMPORTEMENT=_F(RELATION='ACIER'),
                ETAT_INIT=_F(META_INIT_ELNO=PHASINIT),
                MODELE=model,
                OPTION=('META_ELNO', 'META_NOEU', 'DURT_ELNO', 'DURT_NOEU'),
                RESULTAT=rter_0)

The PHASINIT and the last 'rter_0' I copied/adapted from testcase MTPL100b (I added all necessary commands in the beginning of my model as well). My case actually runs this way. The error I mentioned,

CR phase d'initialisation
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   ! <S> Exception utilisateur levee mais pas interceptee.                    !
   ! Les bases sont fermees.                                                  !
   ! Type de l'exception : error                                              !
   !                                                                          !
   !  Le paramètre:  PVARI_R  de l'option:  TOU_INI_ELNO  n'est pas connu des !
   ! TYPE_ELEM du LIGREL:  model   .MODELE                                    !
   !  Champ : &&IRMETA.VARIELGR                                               !
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
fin CR phase d'initialisation

actually happens when I tried to retrieve the results using:

IMPR_RESU(RESU=_F(RESULTAT=rter_0),
	          UNITE=80)

If I delete the IMPR_RESU, the simulation runs without problems, but I cant see the metallurgical results sad
So,
1 - Could you calculate the phases without the CALC_META command? Just using "PMetEnfr = CREA_RESU(..." ?
2 - Is it possible to create commands for a mechanical simulation without running them, just to make the modifications you mentioned?
3 - Do your "Resu1" and "Resu2" come from mechanical simulations?
4 - Is it possible to retrieve the results with other command besides IMPR_RESU?
5 - Based on some observations in other posts, it seems like this type of error is linked to the MED format and the information present in the elements, but I'm not sure about that.

Offline

#7 2021-10-06 19:36:27

Ivp
Member
Registered: 2011-06-03
Posts: 113

Re: [SOLVED]Crea_champ: Operation Disc

Hi,

I'm having a little trouble understanding the calculation sequence. Did your simulation have a mechanical step too

My goal was to run a thermo-mechanical simulation, which is split in 2 steps: 1st: thermal and metallurgical, 2nd: mechanical.
My problem came from reading metallurgical fields (previously computed) which were necessary to solve the mechanical problem.
I have not any complications when I run the thermal and metallurgical simulation. My main code is:

Malla=LIRE_MAILLAGE(FORMAT='MED',
                    UNITE=20,);

M_Ter_3D=AFFE_MODELE(MAILLAGE=Malla,
                     AFFE=_F(TOUT='OUI',
                             PHENOMENE='THERMIQUE',
                             MODELISATION='3D_DIAG',),);

Ch_Mat0=AFFE_MATERIAU(MAILLAGE=Malla,
                       MODELE=M_Ter_3D,
                       AFFE=_F(TOUT='OUI',
                               MATER=AcGKN_T0,),);

Pterm=THER_NON_LINE(MODELE=M_Ter_3D,
                       CHAM_MATER=Ch_Mat0,
                       EXCIT=_F(CHARGE=CC_flux,),
		       COMP_THER_NL=_F(RELATION='THER_NL',
                               	       TOUT='OUI',),
                       INCREMENT=_F(LIST_INST=Time,
				    NUME_INST_FIN=1,),
                       ETAT_INIT=_F(VALE=Taust,),
                       SOLVEUR=_F(METHODE='PETSC',
				  ALGORITHME='CR',
				  PRE_COND='JACOBI',),
		       NEWTON=_F(REAC_ITER=2,),
                       CONVERGENCE=_F(RESI_GLOB_RELA=1e-6,
                                      ITER_GLOB_MAXI=30,),
                       PARM_THETA=1.0,);

FaseInit=CREA_CHAMP(TYPE_CHAM='CART_VAR2_R',
    		OPERATION='AFFE',
    		MAILLAGE=Malla,
    		AFFE=_F(TOUT='OUI',
            		NOM_CMP=('V1','V2','V3','V4','V5',),
            		VALE=(0.,0.,0.,0.,31.2e-6,),),);

Pterm=CALC_META(reuse=Pterm,
   		MODELE=M_Ter_3D,
   		CHAM_MATER=Ch_Mat0,
   		RESULTAT=Pterm,
   		ETAT_INIT=_F(META_INIT_ELNO=FaseInit,),
   		COMP_INCR=_F(RELATION='ACIER',
                	TOUT='OUI',),
		OPTION=('META_ELNO','META_NOEU',),);

IMPR_RESU(FORMAT='MED',
		UNITE=80,
          RESU=_F(RESULTAT=Pterm,
		   	NOM_CHAM = ('TEMP',),
			LIST_INST=Save,),);

IMPR_RESU(FORMAT='MED',
		UNITE=80,
          RESU=_F(RESULTAT=Pterm,
		   	NOM_CHAM = ('META_NOEU',),
			NOM_CMP = ('V1','V2','V3','V4',),
			LIST_INST=Save,),);

Answering your questions:
1.- In Code-Aster, CALC_META is necessary. Other option would be for you to program an algorithm in python, but it's more complex.
2.- You can, for example, to compute a thermo-mechanical simulation running only in Code-Aster the mechanical one. The thermal fields can come from another software or even created directly by the user (with commands CREA_CHAMP, CREA_RESU, ...).
3.- Those (auxiliary) concepts come from reading results (previously computed) using LIRE_RESU. Although I define Resu1 as mechanical result, the data are metallurgical fields.
4.- Try POST_RELEVE_T. You can obtain information in specific zones of the domain.
5.- As you mention, your problem may come from the mesh or the model. What type of element are you using to mesh the domain? I used tetrahedrons and everything was OK.

I hope I've helped you.
Best regards.

Offline

#8 2021-10-08 19:02:35

rodrigofarias
Member
Registered: 2020-09-03
Posts: 61

Re: [SOLVED]Crea_champ: Operation Disc

Ivp wrote:

Hi,

I'm having a little trouble understanding the calculation sequence. Did your simulation have a mechanical step too

My goal was to run a thermo-mechanical simulation, which is split in 2 steps: 1st: thermal and metallurgical, 2nd: mechanical.
....

Thanks my friend, now its working!

Thanks for answering all my questions. As I point it out, the main problem was probably with the IMPR_RESU. Doing it your way, separating in 2 IMPR_RESU, one for TEMP and other for the phases seems to have made a difference.
Also, specifying a NOM_CHAM and the NOM_CMP in the IMPR_RESU may also helped as well.

IMPR_RESU(FORMAT='MED',
		UNITE=80,
          RESU=_F(RESULTAT=Pterm,
		   	NOM_CHAM = ('TEMP',),
			LIST_INST=Save,),);

IMPR_RESU(FORMAT='MED',
		UNITE=80,
          RESU=_F(RESULTAT=Pterm,
		   	NOM_CHAM = ('META_NOEU',),
			NOM_CMP = ('V1','V2','V3','V4',),
			LIST_INST=Save,),);

Answering your question, I used only hexaedron elements. I was able to generate a .rmed file and visualize the distribution of the phases. I consider this matter solved. And I will put a link on the other thread pointing to this one.

A curiosity: the r4.04.01.pdf (Models of metallurgical behavior steels) tells that to transform the TRC of a steel to Aster format, we need to run a fortran program that comes with Aster. For the steel used in your models, were you able to do this? I tested my model with the default material of Aster (steel 16MND5), but I'm probably going to use other steels.

Thank you and regards!

Offline

#9 2021-10-11 16:19:11

Ivp
Member
Registered: 2011-06-03
Posts: 113

Re: [SOLVED]Crea_champ: Operation Disc

rodrigofarias wrote:

Thanks my friend, now its working!

Thanks for answering all my questions. As I point it out, the main problem was probably with the IMPR_RESU. Doing it your way, separating in 2 IMPR_RESU, one for TEMP and other for the phases seems to have made a difference.
Also, specifying a NOM_CHAM and the NOM_CMP in the IMPR_RESU may also helped as well.

Great!!!!

rodrigofarias wrote:

A curiosity: the r4.04.01.pdf (Models of metallurgical behavior steels) tells that to transform the TRC of a steel to Aster format, we need to run a fortran program that comes with Aster. For the steel used in your models, were you able to do this? I tested my model with the default material of Aster (steel 16MND5), but I'm probably going to use other steels.

I can't help you in this question. In order to compute the metallurgical phases, I use another model different from the one implemented in Code-Aster.

Best regards.

Offline