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

You are not logged in.

#1 2020-01-14 23:20:10

mf
Member
Registered: 2019-06-18
Posts: 118

[SOLVED] Calc total heat flux through an arbitrary surface+proposition

Good evening,

I know that similar postings concerning this topic are in this forum. Nevertheless, I did not find a satisfying answer and example to solve this problem in a reasonable time. I still consider myself a beginner in Aster. Pros may find this post useless.

So I spent nearly a day in figuring this out, using mainly topic-id=16219 (not allowed to post links).

I wanted to share part of my example, so that beginners may get to the solution quicker. It follows the answer of Mr. de Soza in above link.

Let's suppose you already have your result 'resther' from whatever thermal calculation:

resther = CALC_CHAMP(identifier='1:2',
                     reuse=resther,
                     RESULTAT=resther,
                     THERMIQUE=('FLUX_NOEU', 'FLUX_ELNO'))

Extract the FLUX_NOEU and name it differently:

FLU_NOEU = CREA_CHAMP(identifier='8:2',
                      INST=1.0,
                      NOM_CHAM='FLUX_NOEU',
                      OPERATION='EXTR',
                      RESULTAT=resther,
                      TYPE_CHAM='NOEU_FLUX_R')

Compute the normal vectors in the group_ma which is the surface of interest:

NORM_VEC = CREA_CHAMP(identifier='4:2',
                      GROUP_MA=('OUT_ALL', ),
                      MODELE=model,
                      OPERATION='NORMALE',
                      TYPE_CHAM='NOEU_GEOM_R')

Then define a formula for the normal flux:

FLUXNORM = FORMULE(identifier='25:1',
                   NOM_PARA=('FLUX', 'FLUY', 'FLUZ', 'X', 'Y', 'Z'),
                   VALE='FLUX*X+FLUY*Y+FLUZ*Z')

Create a function field with said formula:

FLU_FUNC = CREA_CHAMP(identifier='5:2',
                   AFFE=_F(GROUP_MA=('OUT_ALL', ),
                           NOM_CMP=('X1', ),
                           VALE_F=(FLUXNORM, )),
                   MODELE=model,
                   OPERATION='AFFE',
                   TYPE_CHAM='NOEU_NEUT_F')

Evaluate the function field, generating scalar values:

FLUN = CREA_CHAMP(identifier='6:2',
                  CHAM_F=FLU_FUNC,
                  CHAM_PARA=(FLU_NOEU, NORM_VEC),
                  OPERATION='EVAL',
                  TYPE_CHAM='NOEU_NEUT_R')

Integrate above scalars in group 'OUT_ALL' to get the total heat flux (I did not need 5. of Mr. de Soza's example):

FLUN_TOT = POST_ELEM(identifier='7:2',
                     CHAM_GD=FLUN,
                     INTEGRALE=_F(GROUP_MA=('OUT_ALL', ),
                                  NOM_CMP=('X1', ),
                                  TYPE_MAILLE='2D'),
                     MODELE=model,
                     TITRE='FLUN_TOT')

Write the table with above result:

IMPR_TABLE(identifier='11:2',
           FORMAT='TABLEAU',
           TABLE=FLUN_TOT,
           UNITE=9)

That should be all, I assume it is correct as I verified the result with an analytical calculation. Could someone please verify this?

Last, but not least, may I address Aster developers and propose the creation of a new COMMAND doing the above calculations? It should be quite similar to CALC_PRESSION, therefore I want to propose CALC_FLUX or CALC_FLUX_THER as its name. Is this reasonable, does it make sense to the developers? I'm sure, I'm not the only one that needs such a command quite often. Would be nice and save a lot of time!

Kind regards,

Mario.

[SOLVED] because it's just for info...

Last edited by mf (2020-01-17 07:01:24)


Attachments:
Stage_2_EXAMPLE_total_thermal_flux.comm, Size: 1.8 KiB, Downloads: 76

Offline

#2 2020-09-10 10:54:44

ludol78
Member
Registered: 2020-08-07
Posts: 7

Re: [SOLVED] Calc total heat flux through an arbitrary surface+proposition

Hi,

Thank you for the example, it's very useful for a beginner like me. I tried the method but I get an error in FLU_NOEU :

EXCEPTION> <MODELISA4_19>                                                !
   !                                                                           !
   !  One can extract only one sequence number. You specified several of them. !
   !---------------------------------------------------------------------------!
   

Destruction of the concept  FLU_NOEU.
<S> ERREUR UTILISATEUR RECUPEREE PAR LE SUPERVISEUR


I don't understand because I specified that I just extract INST=2 :

FLU_NOEU = CREA_CHAMP(identifier=u'26:1',
                      INST=2.0,
                      NOM_CHAM='FLUX_NOEU',
                      OPERATION='EXTR',
                      RESULTAT=resther,
                      TYPE_CHAM='NOEU_FLUX_R')

Did somone know where the alarm come from ?

Thanks for your help,

Ludovic


Attachments:
message, Size: 118.15 KiB, Downloads: 24

Offline

#3 2020-09-10 12:07:16

mf
Member
Registered: 2019-06-18
Posts: 118

Re: [SOLVED] Calc total heat flux through an arbitrary surface+proposition

Hi,

well, you do not have a timestep at t=2? Your first step is at t=50?

M.

Offline

#4 2020-09-14 15:17:22

ludol78
Member
Registered: 2020-08-07
Posts: 7

Re: [SOLVED] Calc total heat flux through an arbitrary surface+proposition

Hi mf,

Yes that was it. I confused INST and NUME_ORDRE... Your method works fine for me, thank you. I just have one question : How did you know that the component of FLU_NOEU was FLUX, FLUY and FLUZ ? Is that always the type of the champ with X, Y and Z ? I didn't find any explanation in CREA_CHAMP.

Ludovic

Offline

#5 2020-09-14 16:44:12

mf
Member
Registered: 2019-06-18
Posts: 118

Re: [SOLVED] Calc total heat flux through an arbitrary surface+proposition

Hi,

I am glad to hear that.

I didn't know and did not dig that deep. I just followed the example I mentioned and tried a lot.

But the variables are indeed in U4.81.04 (CALC_CHAMP). Unfortunately, there is a translation error for FLUX, it is translated to 'flow' on page 25.

Mario.


Attachments:
Bildschirmfoto vom 2020-09-14 17-39-39.png, Size: 120.67 KiB, Downloads: 25

Offline