[CIG-SEISMO] Cubit Import Error

s.khan at utwente.nl s.khan at utwente.nl
Wed Feb 26 06:13:15 PST 2014


Dear Emanuele,

I can successfully run cubit from command line. And I was using it with the older specfem version. I had no problem with older version except export of topo surface (previous discussion down below), for which you suggested update.

I am getting this message from python command line:
>>> import cubit
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named cubit
>>>

I don't have "cubit.py".

Best regards,
Saad Khan
________________________________
From: cig-seismo-bounces at geodynamics.org [cig-seismo-bounces at geodynamics.org] on behalf of emanuele casarotti [emanuele.casarotti at gmail.com]
Sent: Tuesday, February 25, 2014 11:17 AM
To: cig-seismo at geodynamics.org
Subject: Re: [CIG-SEISMO] Cubit Import Error

It looks like that your cubit pythonpath is not set correctly

Can you run cubit with the command "cubit" (or "claro") from command line?

Can you successfully run "import cubit" from the python command line?

You should have in your pythonpath the directory containing "cubit.py" from the base of cubit (not geocubit).

Emanuele

Il giorno 25/feb/2014, alle ore 04:44, "s.khan at utwente.nl<mailto:s.khan at utwente.nl>" <s.khan at utwente.nl<mailto:s.khan at utwente.nl>> ha scritto:

Dear All,

I have started working with development version. I am following the long version of step-by-step tutorial.

The tutorial says:

If successful, this will generate the files in src/shared/: Makefile, constants.h, and precision.h, among others
I can find constant.h, precision.h but not Makefile.h. This was also the case in the older version 2.1. Is this something to worry about?

When I reach to making mesh, i receive cubit import error: (details available in attachment)

user:~/specfem3d/examples/homogeneous_halfspace$ ./make_mesh.sh
[('--build_volume', ''), ('--mesh', ''), ('--cfg', 'homogeneous_halfspace.cfg')] []
None None
1 1
error importing cubit
error importing cubit, check if cubit is installed
error importing cubit
[('--collect', ''), ('--meshfiles', 'MESH_GEOCUBIT/mesh_vol_0.e'), ('--export2SPECFEM3D', ''), ('--SEMoutput', 'MESH')] []
None None
1 1
error importing cubit

There are few thing I am not sure about (highlighted in the attached doc). I don't know whether they are responsible for it? Do I need to set paths manually?
Is there any example script like 'block_mesh.py' in version2.1 for development version? Because I also tried making mesh with same type of script but boundary_deffinition.py and cubit2specfem3d.py are not working for it.

Thanks in advace.

Best regards,
Saad Khan

________________________________________
From: cig-seismo-bounces at geodynamics.org<mailto:cig-seismo-bounces at geodynamics.org> [cig-seismo-bounces at geodynamics.org<mailto:cig-seismo-bounces at geodynamics.org>] on behalf of emanuele casarotti [emanuele.casarotti at gmail.com<mailto:emanuele.casarotti at gmail.com>]
Sent: Tuesday, January 14, 2014 4:34 PM
To: cig-seismo at geodynamics.org<mailto:cig-seismo at geodynamics.org>
Subject: Re: [CIG-SEISMO] cubit2specfem3d export

OK so this is the old version.

1) I will take a look next week, but I suggest **strongly** to update
specfem3d (https://github.com/geodynamics/specfem3d)

2) The cone_1 has a lot of very deformed hexa with negative jacobian.
You need that all the jacobians are positive.

here the step to create a a good mesh for a conical intrusion

brick x 10
create frustum height 3 radius 3 top 0
graphics silhouette off
rotate Volume 2 angle 180 about X include_merged
align Volume 2 surface 8 with surface 1
subtract volume 2 from volume 1 keep
delete Volume 1 2

create Cylinder height 20 radius 4
chop volume 3 with volume 4

webcut volume all with plane xplane offset 0 preview
webcut volume all with plane xplane offset 0 noimprint nomerge
webcut volume all with plane yplane offset 0 noimprint nomerge
unite volume 9 11 7 5
webcut volume 9 sweep curve 97 vector 0 0 -1 through_all preview
webcut volume 9 sweep curve 97 vector 0 0 -1 through_all
unite volume 6 10 12 8
webcut volume all with plane yplane offset 0 preview
webcut volume all with plane yplane offset 0 noimprint nomerge
webcut volume all with plane xplane offset 0 noimprint nomerge
merge vol all
volume 19 13 16 22 size .5
mesh volume 19 13 16 22
volume 18 9 15 21 scheme Auto
mesh volume 18 9 15 21
surface 137 135 162 169 scheme pave
surface 137 135 162 169 size .5
mesh surface 137 135 162 169
volume 17 6 20 14 scheme Auto
mesh volume 17 6 20 14

block 1 volume all
create mesh geometry Block 1 feature_angle 100.0





On Tue, Jan 14, 2014 at 2:15 PM, <s.khan-1 at utwente.nl<mailto:s.khan-1 at utwente.nl>> wrote:
> Dear Emanuele,
>
>
>
> Please find the scripts and the volume in attachment. I use block_mesh.py
> after making some modification to it. I am using Cubit 13.0.
>
>
>
> Thanks
>
> Best regards,
> Saad Khan
>
>
>
> From: cig-seismo-bounces at geodynamics.org<mailto:cig-seismo-bounces at geodynamics.org>
> [mailto:cig-seismo-bounces at geodynamics.org] On Behalf Of emanuele casarotti
> Sent: Monday, January 13, 2014 8:51 PM
> To: cig-seismo at geodynamics.org<mailto:cig-seismo at geodynamics.org>
> Subject: Re: [CIG-SEISMO] cubit2specfem3d export
>
>
>
> Hi
>
> Can you share the scripta and the volumes?
>
> And the version of cubit...
>
>
>
>
> Emanuele
>
>
> Il giorno 13/gen/2014, alle ore 19:47, "s.khan-1 at utwente.nl<mailto:s.khan-1 at utwente.nl>"
> <s.khan-1 at utwente.nl<mailto:s.khan-1 at utwente.nl>> ha scritto:
>
> Dear All,
>
>
>
> The boundary_definition.py script does not catch my topographic surface. I
> have to define it manually after running the script
> (boundary_definition.py). Then I export the mesh with
> run_cubit2specfem3d.py, which says
>
> :
>
> Writing MESH/free_surface_file.....
>
> block name: face_topo id: 2
>
> number of faces = 0
>
> :
>
> :
>
> # all files needed by SCOTCH are now in directory MESH
>
>
>
> Rest of the process goes smoothly and I also get result in the OUTPUT. The
> question is, what does “number of face=0” mean any does it affect the
> results?
>
>
>
> Another thing, when I use very fine mesh (e.g. mesh interval 3000) the
> result (in seismograms) produces a lot of NaNs and at some places
> Infinities. Why is it so?
>
>
>
> Note: The topo surface has been modified while the rest of geo model is the
> same as given in homogeneous_halfspace example. The topo surface is made of
> several surfaces which are combined to one using simplify option in cubit. I
> am using SPECFEM3D_Cartesian 2.1.
>
>
>
> Thanks in advance.
>
>
>
> Best regards,
>
> Saad Khan
>
> _______________________________________________
> CIG-SEISMO mailing list
> CIG-SEISMO at geodynamics.org<mailto:CIG-SEISMO at geodynamics.org>
> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-seismo
>
>
> _______________________________________________
> CIG-SEISMO mailing list
> CIG-SEISMO at geodynamics.org<mailto:CIG-SEISMO at geodynamics.org>
> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-seismo
_______________________________________________
CIG-SEISMO mailing list
CIG-SEISMO at geodynamics.org<mailto:CIG-SEISMO at geodynamics.org>
http://geodynamics.org/cgi-bin/mailman/listinfo/cig-seismo
<Cubit import error.docx>
_______________________________________________
CIG-SEISMO mailing list
CIG-SEISMO at geodynamics.org<mailto:CIG-SEISMO at geodynamics.org>
http://geodynamics.org/cgi-bin/mailman/listinfo/cig-seismo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://geodynamics.org/pipermail/cig-seismo/attachments/20140226/da618195/attachment.html>


More information about the CIG-SEISMO mailing list