Atom topic feed | site map | contact | login | Protection des données personnelles | Powered by FluxBB | réalisation artaban
You are not logged in.
Hello,
I would like to know, how to create a single field between two crea_champ commands in order to create then a result.
I am able to divide the information i want, meaning, the real and imaginary parts of displacement from a modal analysis but i cannot
figure out how to apply the formula i want and then create the combined field.
At the moment i have arrived here:
for i in range(nb_modes_exp):
CHMCE i = CREA_CHAMP(NOM_CHAM='DEPL',
NUME_ORDRE=l_modes_exp i ,
OPERATION='EXTR',
RESULTAT=MODNUM,
TYPE_CHAM='NOEU_DEPL_C')
VRExpR i = CREA_CHAMP(CHAM_GD=CHMCE i,
NUME_DDL=NDLLNUM,
OPERATION='C2R',
PARTIE='REEL',
TYPE_CHAM='NOEU_DEPL_R')
VRExpI i = CREA_CHAMP(CHAM_GD=CHMCE i ,
NUME_DDL=NDLLNUM,
OPERATION='C2R',
PARTIE='IMAG',
TYPE_CHAM='NOEU_DEPL_R')
Would you have any suggestions to give me?
"The " i " should have been inside parenthesis but i am getting a forum error saying :
i was opened within itself, this is not allowed
Offline
Hi GPSalachs
I am showing here a simple example I used to extract the maximum velocities from an analysis (resDyna) and to create two fields, one with the squared values and one with the signed squared values. It can be helpful for your case. Or you already know this but your problem is how to consider two fields?
PS: you should put any code in brackets with the word code inside (see here h ttps://www.code-aster.org/forum2/help.php#bbcode)
f_square = FORMULE(
NOM_PARA = ('DZ',),
VALE = 'DZ**2'
)
f_signSq = FORMULE(
NOM_PARA = ('DZ',),
VALE = 'DZ*abs(DZ)'
)
vite_ch = CREA_CHAMP(
OPERATION = 'EXTR',
RESULTAT = resDyna,
NOM_CHAM = 'VITE',
TYPE_CHAM = 'NOEU_DEPL_R',
TYPE_MAXI = 'NORM_TRAN',
TYPE_RESU = 'VALE'
)
vite_fun = CREA_CHAMP(
OPERATION = 'AFFE',
TYPE_CHAM = 'NOEU_NEUT_F',
# MODELE = model,
MAILLAGE = mesh0,
AFFE = (
_F(
TOUT = 'OUI',
NOM_CMP = ('X1', 'X2'),
VALE_F = (f_square, f_signSq)
)
)
)
vite = CREA_CHAMP(
TYPE_CHAM = 'NOEU_NEUT_R',
OPERATION = 'EVAL',
CHAM_F = vite_fun,
CHAM_PARA = vite_ch
)
res_Vite = CREA_RESU(
OPERATION = 'AFFE',
TYPE_RESU = 'EVOL_ELAS',
NOM_CHAM = 'UT01_NOEU',
AFFE = (
_F(
CHAM_GD = vite,
INST = 0
)
)
)
Aether Engineering
- aethereng.com -
Offline
Hello,
thank you very much for the example you have given me! It was indeed usefull for
combining different pieces of data all toghether because i thought it would be done once
all the interested pieces were added to a single table so to manipulate later the table with formulas.
Thank you also very much for the link, i have completely missed the forums usage code!
Offline