Atom topic feed | site map | contact | login | Protection des données personnelles | Powered by FluxBB | réalisation artaban
You are not logged in.
Pages: 1
Hi all,
I have been trying the thread provided by
http://code-aster.org/forum2/viewtopic.php?id=14348, which imports partition module to use the class MAIL_PY(). But I cannot import the partition even after I added partition module in the search folder.
Therefore, I am wondering if it is possible to get the information of the mesh,which imported by the command LIRE_MAILLAGE. This information includes the coordinates of each node in the mesh, nodes numbers , elements number as so on. What I am going to do is to use this information in a python script. Based on the node coordinates, I can automatically identify which nodes belong to a certain element. And the element numbers determine the loops.
Thank you all.
Kevin
Last edited by Kevin-JS (2016-10-21 04:08:07)
Offline
Hoi Kevin
did you use the DEBUT(PAR_LOT='NON')?
See snippet below.
groeten
kees
----------------------------------------------------------------------------------
DEBUT(PAR_LOT='NON');
import sys
# assume ''construct_shell_thickness'' in folder:
sys.path.append("/cae_sg500/caexample/caelinux/coque_3d/varyshth/")
cpath = sys.path
print 'length of cpath: ',len(cpath)
print 'current path: ',cpath
print 'current appended path: ',cpath[-1]
....
# reading initial mesh
meshinit=LIRE_MAILLAGE(FORMAT='MED',INFO=1,);
#define shell (coque_3D) model;
# we have to add centre nodes with CREA_MAILLAGE
meshmod=CREA_MAILLAGE(MAILLAGE=meshinit,MODI_MAILLE=(_F(TOUT='OUI',OPTION='QUAD8_9',),),);
.....
from construct_shell_thickness import *
from Utilitai.partition import *
import numpy
info = 2
ThicknessGroupShell = construct_shell_thickness(meshmod,info)
---------------------------------------------------------------------------------------------------------
Last edited by keeswouters (2016-10-29 15:08:38)
kind regards - kees
--
I a parallel univers the laws of mechanics may be different.
Offline
Hi Kees,
Thank you for your reply.
Hoi Kevin
did you use the DEBUT(PAR_LOT='NON')?
See snippet below.groeten
kees
Yes, I did. In your post, you still used the command:
from Utilitai.partition import *
. This issue is that I have some trouble in importing partition module. Here is a detail of the issue:http://code-aster.org/forum2/viewtopic.php?id=20909 Is there any alternative way to get the nodes coordinates straightforward. Or do you have any suggestion to solve the abovementioned problem. Thank you very much.
Regards,
Kevin
Offline
Hi
I installed salome-meca at my home directory.
and I added the path for Utilitai before import.
The following example works well for me.
#-------------------------example-------------------------------------
DEBUT(PAR_LOT='NON');
import sys
import os
import numpy as np
sys.path.append("~/salome_meca/V2016/tools/Code_aster_stable-1260/lib/aster/Utilitai")
from Utilitai.partition import *
# ...
Last edited by chun9ky (2016-10-30 09:51:05)
Offline
Pages: 1