Atom topic feed | site map | contact | login | Protection des données personnelles | Powered by FluxBB | réalisation artaban
You are not logged in.
I am running a simple simulation (files attached) of a 2D beam elements in a for loop for different parameters of a cross section. I have managed to save the DEPL results of every i-th step in one MED file as below:
disp = [None for i in range(0, N)]
affe = [None for i in range(0, N)]
for i in range(0, N):
disp[i] = CREA_CHAMP(TYPE_CHAM = 'NOEU_DEPL_R',
NOM_CHAM = 'DEPL',
OPERATION = 'EXTR',
RESULTAT = res[i],
INST = 0)
affe[i] = _F(MODELE = model,
CARA_ELEM = elpr[i],
CHAM_GD = disp[i],
INST = i)
# create result file
reslin = CREA_RESU(OPERATION = 'AFFE',
TYPE_RESU = 'EVOL_ELAS',
NOM_CHAM = 'DEPL',
AFFE = affe)
IMPR_RESU(FORMAT='MED',
RESU=_F(RESULTAT=reslin),
UNITE=3)
I would also like to include SIEF_ELNO and SIPO_ELNO....from CALC_CHAMP() to the MED file of each i-th step. Can you please give me some guidelines/direction how to add this data to CREA_RESU and save to MED file with IMPR_RESU.
Thank you very much!
lskrinjar
Last edited by lskrinjar (2022-01-10 21:16:52)
Offline
I am running a simple simulation (files attached) of a 2D beam elements in a for loop for different parameters of a cross section. I have managed to save the DEPL results of every i-th step in one MED file as below:
disp = [None for i in range(0, N)] affe = [None for i in range(0, N)] for i in range(0, N): disp[i] = CREA_CHAMP(TYPE_CHAM = 'NOEU_DEPL_R', NOM_CHAM = 'DEPL', OPERATION = 'EXTR', RESULTAT = res[i], INST = 0) affe[i] = _F(MODELE = model, CARA_ELEM = elpr[i], CHAM_GD = disp[i], INST = i) # create result file reslin = CREA_RESU(OPERATION = 'AFFE', TYPE_RESU = 'EVOL_ELAS', NOM_CHAM = 'DEPL', AFFE = affe) IMPR_RESU(FORMAT='MED', RESU=_F(RESULTAT=reslin), UNITE=3)
I would also like to include SIEF_ELNO and SIPO_ELNO....from CALC_CHAMP() to the MED file of each i-th step. Can you please give me some guidelines/direction how to add this data to CREA_RESU and save to MED file with IMPR_RESU.
Thank you very much!
lskrinjar
Offline
hello
on first question
what is the use of
import pandas as pd
and what is pandas,
the reslin you create contains only displacement it is not possible to calculate stress and so on directly from it it is clearly stated in the message file
!----------------------------------------------------------------------------------------------------!
! <A> <CALCCHAMP_6> !
! !
! Le mot clef EXCIT de la commande n'est pas renseigné et la récupération des chargements concernant !
! le résultat reslin n'est actuellement pas possible. !
! !
! Conseil : Il faut renseigner le mot clef EXCIT de la commande CALC_CHAMP, !
! !
! !
! This is a warning. If you do not understand the meaning of this !
! warning, you can obtain unexpected results! !
!----------------------------------------------------------------------------------------------------!
why not just simply adding in the first loop
the right operator to print the indexed stress field in the med file
jean pierre aubry
consider reading my book
freely available here https://framabook.org/beginning-with-code_aster/
Offline
hello
on first question
what is the use of
import pandas as pd
and what is pandas,the reslin you create contains only displacement it is not possible to calculate stress and so on directly from it it is clearly stated in the message file
!----------------------------------------------------------------------------------------------------! ! <A> <CALCCHAMP_6> ! ! ! ! Le mot clef EXCIT de la commande n'est pas renseigné et la récupération des chargements concernant ! ! le résultat reslin n'est actuellement pas possible. ! ! ! ! Conseil : Il faut renseigner le mot clef EXCIT de la commande CALC_CHAMP, ! ! ! ! ! ! This is a warning. If you do not understand the meaning of this ! ! warning, you can obtain unexpected results! ! !----------------------------------------------------------------------------------------------------!
why not just simply adding in the first loop
the right operator to print the indexed stress field in the med filejean pierre aubry
Hello jean pierre aubry,
thank you for your quick reply. The pandas is external python module that I did not remove it for this minimal working example. The edited files are attached.
I have also implemented to write the solution at each i-th step, but then in the ParaVis I am not able to use "Time" (1 or 2 in this example) to change between different "steps".
for i in range(0, N):
A = 10 * (i+1)
RY = 5. * (i+1)
RZ = 5. * (i+1)
IY = 100. * (i+1)
IZ = 100. * (i+1)
elpr[i]= AFFE_CARA_ELEM(identifier='2:1',
MODELE=model,
POUTRE=_F(CARA=('A', 'IY', 'IZ', 'AZ', 'AY', 'JX', 'RY', 'RZ'),
GROUP_MA=('elements', ),
SECTION='GENERALE',
VALE=(A, IY, IZ, 1., 1., 1., RY, RZ),
VARI_SECT='CONSTANT'))
# solve
res[i] = MECA_STATIQUE(CARA_ELEM=elpr[i],
CHAM_MATER=fieldmat,
EXCIT=(_F(CHARGE=sups),
_F(CHARGE=loads)),
MODELE=model)
# post process
res[i] = CALC_CHAMP(reuse=res[i],
CONTRAINTE=('SIEF_ELNO', 'SIPO_ELNO', 'SIPM_ELNO', 'EFGE_NOEU', 'SIPO_NOEU'),
FORCE=('REAC_NODA',),
RESULTAT=res[i])
IMPR_RESU(FORMAT='MED',
RESU=_F(RESULTAT=res[i]),
UNITE=3)
Can you please give some guidelines how could this be implemented in the first loop?
Thank you for your advice!
Last edited by lskrinjar (2022-01-10 13:45:24)
Offline
trouble with paravis,
i do not use it
the attached file produces results visible in Gmsh
consider reading my book
freely available here https://framabook.org/beginning-with-code_aster/
Offline
trouble with paravis,
i do not use it
the attached file produces results visible in Gmsh
Hello jeanpierreaubry,
thank you for the edited .comm file. The values are stored as requested and I can access/visualize it in ParaViS, although I would prefer to also have the possibility in ParaViS to step through results as in h ttps://www.youtube.com/watch?v=Fy49b0nwpXI @22:32. Any ideas?
Thank you for your kind help!
Offline
Hi Luka,
In order to add more fields you have to use similarly a for loop to extract each one, you just have to change to the correct TYPE_CHAM and NOM_CHAM, which you can find in the CREA_CHAMP documentation. For example SIEF_ELNO and ELNO_SIEF_R.
Then, in CREA_RESU, since you will call it for a second time and more, enriching the result fields, you will have to add reuse=reslin and RESULTAT=reslin
sief = [None for i in range(0, N)]
affe = [None for i in range(0, N)]
for i in range(0, N):
sief[i] = CREA_CHAMP(TYPE_CHAM = 'ELNO_SIEF_R',
NOM_CHAM = 'SIEF_ELNO',
OPERATION = 'EXTR',
RESULTAT = res[i],
INST = 0)
affe[i] = _F(MODELE = model,
CARA_ELEM = elpr[i],
CHAM_GD = disp[i],
INST = i)
# create result file
reslin = CREA_RESU(
reuse = reslin,
RESULTAT = reslin,
OPERATION = 'AFFE',
TYPE_RESU = 'EVOL_ELAS',
NOM_CHAM = 'DEPL',
AFFE = affe)
Last edited by Ioannis (2022-01-15 09:06:30)
Aether Engineering
- aethereng.com -
Offline