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

You are not logged in.

#1 2021-04-29 10:41:46

Pisolino
Member
From: Italy
Registered: 2009-04-06
Posts: 60

Error with conductivity using AFFE_VARC NEUT1 and custom field

Dear all,
i'm trying to perform a particular simulation (injection molding filling) using a specific thermal conductivity (lambda) defined by a formula, evaluated as a field and then given as affe_varc + identity function (as performed i.e. here /viewtopic.php?id=20385 and in CA documentation u4.43.03) .

I can't understand why the solver doesn't take in count such conductivity. No errors are given, the simulation goes till the end but the results are completely nonsense. Moreover if i change the formula effectiveVisc (i.e. i double or tenfold the value) no numerical change at all in the result. I also exported the custom field CHLAM as a resu and the values are exactly what they should be, so the EVAL step is ok i suppose.

Can you give me any suggestion on where to look? is this because i use a THER_NON_LINE ?

code extraction:

def effectiveVisc(x1):
                         efV= (x1**2)/(12*viscosity/100000);                           
                         return efV;

FMULT1= FORMULE(NOM_PARA=('X1'),VALE='effectiveVisc(X1)',effectiveVisc=effectiveVisc, viscosity=viscosity,);

CHFMU1=CREA_CHAMP(OPERATION='AFFE',TYPE_CHAM='NOEU_NEUT_F', MODELE=mod_t, #PROL_ZERO='OUI',
                  AFFE=_F(TOUT='OUI', NOM_CMP=('X1'),VALE_F=FMULT1));

CHLAM=CREA_CHAMP( OPERATION='EVAL', TYPE_CHAM='NOEU_NEUT_R', CHAM_F=CHFMU1, CHAM_PARA=(CHTH));

lam_f= DEFI_FONCTION(NOM_PARA='NEUT1',VALE=(-1e9,-1e9,1e9,1e9),PROL_DROITE='LINEAIRE',PROL_GAUCHE='LINEAIRE');

matpar=DEFI_MATERIAU(THER_NL=_F(LAMBDA=lam_f, RHO_CP=dens_f,),);

mat_t=AFFE_MATERIAU(MODELE=mod_t,
                      AFFE= affemat,
                      AFFE_VARC=(
                                 _F(NOM_VARC='TEMP', VALE_REF=1.0,),
                                 _F(NOM_VARC='NEUT1',CHAM_GD=CHLAM),  #variabile viscosità specifica                               
                                 )
                               );

for i in range(1,len(listatempo1)-1):
  tnlin=THER_NON_LINE(reuse= tnlin,
                      MODELE=mod_t,
                      CHAM_MATER=mat_t,
                      COMPORTEMENT=_F(RELATION='THER_NL',),
                      EXCIT=load1,
                      INCREMENT=_F(LIST_INST=tempo,
                                   INST_INIT=listatempo1[ i ],
                                   INST_FIN= listatempo1[ i+1 ],),
                      ETAT_INIT=_F(EVOL_THER=tnlin, INST=listatempo1[ i ]),
                      NEWTON=_F(REAC_ITER=1,),
                      PARM_THETA=theta,
                      CONVERGENCE=_F(ITER_GLOB_MAXI=200,
                                     RESI_GLOB_RELA=5e-4,),);

Offline

#2 2021-04-29 13:07:18

Pisolino
Member
From: Italy
Registered: 2009-04-06
Posts: 60

Re: Error with conductivity using AFFE_VARC NEUT1 and custom field

It seems, and i don't know why, that the problem arises in what the interpolation for the identity functions reads.

TEST1 =  no more identity function, constant function = 1e-9,1e-3,1e+9,1e-3  : every value of x (my custom field) y(x) is 1e-3   =  results are in agreement with 1e-3 values.

TEST2 =  playing with limits, identity function bounded =  1e-5,1e-5,1e-3,1e-3  left and right = 'CONSTANT'   = results are in agreement with value 1e-3

TEST3 = playing again with limits, identity function bounded =  1e-5,1e-5,1e-3,1e-3  left = 'CONSTANT' and right = 'LINEAIRE' = results totally non-sense.

Up to now non-sense means =  value of my function far larger than the maximum found in my custom field CHLAM (values >1e-3 maybe 1 or 10, i don't know). And moreover they seems pretty uniform.

currently the RESU with CHLAM has values between [0.0001 - 0.00065]. In which way can code_aster read such greater values from CHLAM ?

Offline

#3 2021-05-04 16:53:37

Pisolino
Member
From: Italy
Registered: 2009-04-06
Posts: 60

Re: Error with conductivity using AFFE_VARC NEUT1 and custom field

Dear all,
i'm still investigating such error.
Does anyone knows how to access directly to the lambda field (as in a common thermal simulation) ?
maybe understanding its real values i can understand the source of the interpolating error.


Another question, i tried to define lambda(NEUT1) field since it is possible to do it with E modulus (as stated in many documents), is it possible that thermal solver doesn't accept any kind of customized field lambda?

[EDIT] I finally found this post: www  .code-aster.org/forum2/viewtopic.php?id=19423
from 2014, so it is confirmed that the main reason is that i'm using a THER_NON_LINE simulation instead of a THER_LINEAIRE?




Thank you in advance for any suggestion,

Andrea

Last edited by Pisolino (2021-05-04 17:52:25)

Offline