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

You are not logged in.

#1 2019-04-13 11:24:34

Ioannis
Member
Registered: 2016-04-01
Posts: 41

Assignment of two fields with CREA_RESU [SOLVED]

Hi all,

I want to create a field of temperature with CREA_CHAMP and insert it in a new result concept with CREA_RESU.
I can do that for a single time instant but if I want to create and assign a new field for a second time instant after the first creation/assignment I get an error that I do not manage to overpass.

The comm file is pretty simple:

DEBUT()

mesh = LIRE_MAILLAGE(UNITE = 20)

model = AFFE_MODELE(
    AFFE = _F(
        GROUP_MA = 'shell',
        MODELISATION = 'DKT',
        PHENOMENE = 'MECANIQUE'
    ),
    MAILLAGE = mesh
)

tempFld = CREA_CHAMP(
    TYPE_CHAM = 'NOEU_TEMP_R',
    OPERATION = 'AFFE',
    MODELE = model,
    AFFE = _F(
        GROUP_MA = 'shell',
        NOM_CMP = 'TEMP',
        VALE = 10.0
    )
)

tempRes = CREA_RESU(
    OPERATION = 'AFFE',
    TYPE_RESU = 'EVOL_THER',
    NOM_CHAM = 'TEMP',
    AFFE = _F(
        CHAM_GD = tempFld,
        INST = 10.0
    )
)

DETRUIRE(
    CONCEPT = _F(NOM = tempFld),
    INFO = 1
)

tempFld = CREA_CHAMP(
    TYPE_CHAM = 'NOEU_TEMP_R',
    OPERATION = 'AFFE',
    MODELE = model,
    AFFE = _F(
        GROUP_MA = 'shell',
        NOM_CMP = 'TEMP',
        VALE = 20.0
    )
)

tempRes = CREA_RESU(
    reuse = tempRes,
    OPERATION = 'AFFE',
    TYPE_RESU = 'EVOL_THER',
    NOM_CHAM = 'TEMP',
    AFFE = _F(
        CHAM_GD = tempFld,
        INST = 20.0
    )
)

IMPR_RESU(
    RESU = _F(
        RESULTAT = tempRes,
        NOM_CHAM = 'TEMP'
    ),
    UNITE = 80
)

FIN()

The error I get is:

ERREUR A LA VERIFICATION SYNTAXIQUE - INTERRUPTION
>> JDC.py : DEBUT RAPPORT
DEBUT CR validation : fort.1
   Etape : CREA_RESU    ligne : 58    fichier : u'fort.1'
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      ! Concept réutilisé : non trouvé sous RESULTAT|RESU_FINAL !
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   Fin Etape : CREA_RESU
FIN CR validation :fort.1

>> JDC.py : FIN RAPPORT
EXECUTION_CODE_ASTER_EXIT_14659-Ubuntu-ThinkPad-P1=1

<I>_EXIT_CODE = 1

I have tried it also with a DEPL field and I get the same error, while if I use LIST_INST in CREA_RESU, instead of INST, with a DEFI_LIST_REEL result I do not get an error, but my intention is to assign the second field at a later time in the analysis.

Comm and med files are attached.
Any help would be appreciated, thanks.

Last edited by Ioannis (2019-04-19 10:57:20)


Attachments:
simple.tar.xz, Size: 1.9 KiB, Downloads: 3

Aether Engineering
- aethereng.com -

Offline

#2 2019-04-13 14:47:09

jeanpierreaubry
Guru
From: nantes (france)
Registered: 2009-03-12
Posts: 3,390

Re: Assignment of two fields with CREA_RESU [SOLVED]

hello Ioannis

when i want to do that i use several instance of in AFFE within a single CREA_RESU
there is an example in chapter 10 in my book

jean pierre aubry

Offline

#3 2019-04-13 15:28:12

Ioannis
Member
Registered: 2016-04-01
Posts: 41

Re: Assignment of two fields with CREA_RESU [SOLVED]

thank you jean pierre for your feedback.
Your example is very useful in general but for my specific case I will need to assign the temperature at the next step based on the results of the current step, hence my need to use CREA_RESU in each time step.


Aether Engineering
- aethereng.com -

Offline

#4 2019-04-15 12:11:57

mathieu.courtois
Administrator
From: France
Registered: 2007-11-21
Posts: 1,159

Re: Assignment of two fields with CREA_RESU [SOLVED]

Hi Ioannis,

The attached study works without error (with the stable version and with the last development version too).

Which version are you using?

MC


Code_Aster release : last unstable on Ubuntu 16.04 64 bits - GNU Compilers

Please do not forget to tag your first post as *SOLVED* when it is!

Offline

#5 2019-04-15 12:54:43

Ioannis
Member
Registered: 2016-04-01
Posts: 41

Re: Assignment of two fields with CREA_RESU [SOLVED]

Hi Mathieu and thanks for your reply,

I have installed the latest available version of Salome-Meca (2018.0.1) and I am using astk to launch the analysis.
I have tried all versions (default, stable, testing) with the same results, both on Ubuntu 18.04 and Ubuntu 18.10.
It is a strange error as indeed the commands implicated are basic.
Would it make sense to try and install CA without Salome-Meca?


Aether Engineering
- aethereng.com -

Offline

#6 2019-04-15 17:38:02

mathieu.courtois
Administrator
From: France
Registered: 2007-11-21
Posts: 1,159

Re: Assignment of two fields with CREA_RESU [SOLVED]

Curious...

Could you send me the full output (.o + .e from ~/flasheur)?
or the .hdf file + _Files directory?


Code_Aster release : last unstable on Ubuntu 16.04 64 bits - GNU Compilers

Please do not forget to tag your first post as *SOLVED* when it is!

Offline

#7 2019-04-19 10:40:19

Ioannis
Member
Registered: 2016-04-01
Posts: 41

Re: Assignment of two fields with CREA_RESU [SOLVED]

Hi Mathieu,
Interestingly I tried with asterStudy and the script works as expected, so I guess sth is wrong while running the script with astk.
In any case, I have attached the two files you asked from flasheur.
I will mark the title as solved since the actual code referenced is correct.
In the meantime, if you manage to identify anything please let me know.
Thanks,
Ioannis


Attachments:
flasheur.tar.xz, Size: 9.39 KiB, Downloads: 3

Aether Engineering
- aethereng.com -

Offline

#8 2019-04-19 14:49:54

mathieu.courtois
Administrator
From: France
Registered: 2007-11-21
Posts: 1,159

Re: Assignment of two fields with CREA_RESU [SOLVED]

Hi,

Are you sure that you are using the same code_aster version?
Isn't it a confusion with salome_meca 2018.0.1 "official" and  the "V8_INTEGR" one that might be wrong?

To be sure, can you send me the revision SHA1 that is printed at the beginning of the execution by each version (just run DEBUT/FIN for example)?
Warning: the header is not printed in case of syntax error!

Mathieu


Code_Aster release : last unstable on Ubuntu 16.04 64 bits - GNU Compilers

Please do not forget to tag your first post as *SOLVED* when it is!

Offline

#9 Yesterday 10:17:13

Ioannis
Member
Registered: 2016-04-01
Posts: 41

Re: Assignment of two fields with CREA_RESU [SOLVED]

Well, I have only installed the "V8_INTEGR" version but exactly the same problem is encountered in another machine with only the official 2018.0.1 version of salome_meca installed . I am attaching a mess file of a DEBUT/FIN analysis so that you can see the revision SHA1. Note that the script does not work with any of the available versions (default/stable/testing) selected from astk.

Let me know if you need anything else,
Thanks,
Ioannis


Attachments:
output.mess, Size: 13.06 KiB, Downloads: 2

Aether Engineering
- aethereng.com -

Offline

Board footer