[GiDlist] creating and generating mesh of optical fiber with

Moderator: GiD Team

Post Reply
sohel sher

[GiDlist] creating and generating mesh of optical fiber with

Post by sohel sher »

Hi GID experts,


Using GiD I want to create the cross section of an optical fiber consisting of core and cladding. First i create two circles, one inside other, as follows: geometry-create-object-circle. I get a trouble while assigning material to core and cladding. How can i make the NURBS surface distinct for the core and cladding section so that i can assign different refractive index to each part. I would also like to generate mesh of this structure with the core part having higher number of mesh elements. Your kind suggestion will be much appreciated.

Sohel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20130630/3f31fdb8/attachment.htm
Agnese Murianni

[GiDlist] creating and generating mesh of optical fiber with

Post by Agnese Murianni »

Hi Sohel.
I think that you have to work by layers, so it's more simple to assign different properties to different section switching off each time the layer of interest.

Agnese

From: gidlist-bounces at listas.cimne.upc.edu [mailto:gidlist-bounces at listas.cimne.upc.edu] On Behalf Of sohel sher
Sent: domenica 30 giugno 2013 20:22
To: gidlist at listas.cimne.upc.edu
Subject: [GiDlist] creating and generating mesh of optical fiber with GiD

Hi GID experts,

Using GiD I want to create the cross section of an optical fiber consisting of core and cladding. First i create two circles, one inside other, as follows: geometry-create-object-circle. I get a trouble while assigning material to core and cladding. How can i make the NURBS surface distinct for the core and cladding section so that i can assign different refractive index to each part. I would also like to generate mesh of this structure with the core part having higher number of mesh elements. Your kind suggestion will be much appreciated.

Sohel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20130701/eddc8331/attachment.htm
sohel sher

[GiDlist] creating and generating mesh of optical fiber with

Post by sohel sher »

Thanks, Agnese! Following your feedback i have been able to assign different materials to different layer(core and cladding) of the fiber. However, i face a difficulty when generating mesh for the structure. I want to mesh the structure layer by layer but it didn't work that way. I found that the mesh elements are kind of overlapped with each layer. How can i have the distinct meshes for each layer(core and cladding)? Any suggestion will be highly appreciated.




________________________________
From: Agnese Murianni agnese.murianni at dappolonia.it
To: "gidlist at listas.cimne.upc.edu" gidlist at listas.cimne.upc.edu&gt sohel sher sohelsher at yahoo.com
Sent: Monday, July 1, 2013 1:08 PM
Subject: Re: [GiDlist] creating and generating mesh of optical fiber with GiD




Hi Sohel.
I think that you have to work by layers, so it’s more simple to
assign different properties to different section switching off each time the layer
of interest.

Agnese

From:gidlist-bounces at listas.cimne.upc.edu
[mailto:gidlist-bounces at listas.cimne.upc.edu] On Behalf Of sohel sher
Sent: domenica 30 giugno 2013 20:22
To: gidlist at listas.cimne.upc.edu
Subject: [GiDlist] creating and generating mesh of optical fiber with
GiD

Hi GID
experts,

Using GiD I want to create the cross section of an optical fiber consisting of
core and cladding. First i create two circles, one inside other, as follows:
geometry-create-object-circle. I get a trouble while assigning
material to core and cladding. How can i make the NURBS surface distinct for
the core and cladding section so that i can assign different refractive index
to each part. I would also like to generate mesh of this structure with the
core part having higher number of mesh elements. Your kind suggestion
will be much appreciated.

Sohel

_______________________________________________
GiDlist mailing list
GiDlist at listas.cimne.upc.edu
http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20130701/184c88a8/attachment.htm
User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

[GiDlist] creating and generating mesh of optical fiber with

Post by escolano »

It seems that you have created two overlapped circles.
probably you must create a ring filled with the other circle, and both circles connected sharing the same circumference curve.

You can create a hole in a surface for example with:
Geometry-Edit-Hole NURBS surface
then select the surface and the curve/s that define its hole
and press escape to finish the command

To fill the hole you must simply create another surface (I recommend to use different layers to visualize better)
Geometry-Create-NURBS surface-By contour.

About your desire to concentrate finer mesh in some parts, you can assign mesh sizes to geometric entities to specify the required size
(e.g. could apply a small size to the shared line, and to the inner surface, and left the general mesh size to the rest of entities without any specified size)

I recommend you to follow some 'GiD user manual' tutorial to start learning GiD (http://www.gidhome.com/support/tutorials)

Enrique Escolano
----- Original Message -----
From: sohel sher
To: gidlist at listas.cimne.upc.edu
Sent: Monday, July 01, 2013 7:38 PM
Subject: Re: [GiDlist] creating and generating mesh of optical fiber with GiD


Thanks, Agnese! Following your feedback i have been able to assign different materials to different layer(core and cladding) of the fiber. However, i face a difficulty when generating mesh for the structure. I want to mesh the structure layer by layer but it didn't work that way. I found that the mesh elements are kind of overlapped with each layer. How can i have the distinct meshes for each layer(core and cladding)? Any suggestion will be highly appreciated.





------------------------------------------------------------------------------
From: Agnese Murianni agnese.murianni at dappolonia.it
To: "gidlist at listas.cimne.upc.edu" gidlist at listas.cimne.upc.edu&gt sohel sher sohelsher at yahoo.com
Sent: Monday, July 1, 2013 1:08 PM
Subject: Re: [GiDlist] creating and generating mesh of optical fiber with GiD



Hi Sohel.
I think that you have to work by layers, so it’s more simple to assign different properties to different section switching off each time the layer of interest.

Agnese

From: gidlist-bounces at listas.cimne.upc.edu [mailto:gidlist-bounces at listas.cimne.upc.edu] On Behalf Of sohel sher
Sent: domenica 30 giugno 2013 20:22
To: gidlist at listas.cimne.upc.edu
Subject: [GiDlist] creating and generating mesh of optical fiber with GiD

Hi GID experts,

Using GiD I want to create the cross section of an optical fiber consisting of core and cladding. First i create two circles, one inside other, as follows: geometry-create-object-circle. I get a trouble while assigning material to core and cladding. How can i make the NURBS surface distinct for the core and cladding section so that i can assign different refractive index to each part. I would also like to generate mesh of this structure with the core part having higher number of mesh elements. Your kind suggestion will be much appreciated.

Sohel


_______________________________________________
GiDlist mailing list
GiDlist at listas.cimne.upc.edu
http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist





------------------------------------------------------------------------------


_______________________________________________
GiDlist mailing list
GiDlist at listas.cimne.upc.edu
http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20130701/1f166e43/attachment.htm
sohel sher

[GiDlist] creating and generating mesh of optical fiber with

Post by sohel sher »

Thanks a lot, Enrique Escolano! Your instructions were very helpful. I have been able to make it now.:)

Best regards
Sohel



________________________________
From: Enrique Escolano escolano at cimne.upc.edu
To: gidlist at listas.cimne.upc.edu; sohel sher sohelsher at yahoo.com
Sent: Tuesday, July 2, 2013 12:48 AM
Subject: Re: [GiDlist] creating and generating mesh of optical fiber with GiD




It seems that you have created two overlapped
circles.
probably you must create a ring filled with the
other circle, and both circles connected sharing the same circumference
curve.

You can create a hole in a surface for example
with:
Geometry-Edit-Hole NURBS
surface
then select the surface and the curve/s that define
its hole
and press escape to finish the command

To fill the hole you must simply create another
surface (I recommend to use different layers to visualize better)
Geometry-Create-NURBS surface-By
contour.

About your desire to concentrate finer mesh in some
parts, you can assign mesh sizes to geometric entities to specify the required
size
(e.g. could apply a small size to the shared line,
and to the inner surface, and left the general mesh size to the rest of entities
without any specified size)

I recommend you to follow some 'GiD user manual'
tutorial to start learning GiD (http://www.gidhome.com/support/tutorials)

Enrique Escolano
----- Original Message -----
From: sohel sher
To: gidlist at listas.cimne.upc.edu
Sent: Monday, July 01, 2013 7:38 PM
Subject: Re: [GiDlist] creating and generating mesh of optical fiber with GiD


Thanks, Agnese! Following your feedback i have been able to assign different materials to different layer(core and cladding) of the fiber. However, i face a difficulty when generating mesh for the structure. I want to mesh the structure layer by layer but it didn't work that way. I found that the mesh elements are kind of overlapped with each layer. How can i have the distinct meshes for each layer(core and cladding)? Any suggestion will be highly appreciated.





________________________________
From: Agnese Murianni agnese.murianni at dappolonia.it
To: "gidlist at listas.cimne.upc.edu" gidlist at listas.cimne.upc.edu&gt sohel sher sohelsher at yahoo.com
Sent: Monday, July 1, 2013 1:08 PM
Subject: Re: [GiDlist] creating and generating mesh of optical fiber with GiD




Hi Sohel.
I think that you have to work by layers, so it’s more simple to assign different properties to different section switching off each time the layer of interest.

Agnese

From:gidlist-bounces at listas.cimne.upc.edu [mailto:gidlist-bounces at listas.cimne.upc.edu] On Behalf Of sohel sher
Sent: domenica 30 giugno 2013 20:22
To: gidlist at listas.cimne.upc.edu
Subject: [GiDlist] creating and generating mesh of optical fiber with GiD

Hi GID experts,

Using GiD I want to create the cross section of an
optical fiber consisting of core and cladding. First i create two circles, one
inside other, as follows: geometry-create-object-circle. I get a
trouble while assigning material to core and cladding. How can i make the
NURBS surface distinct for the core and cladding section so that i can assign
different refractive index to each part. I would also like to generate mesh of
this structure with the core part having higher number of mesh elements.
Your kind suggestion will be much
appreciated.

Sohel

_______________________________________________
GiDlist
mailing list
GiDlist at listas.cimne.upc.edu
http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist



________________________________
_______________________________________________
GiDlist mailing
list
GiDlist at listas.cimne.upc.edu
http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist

_______________________________________________
GiDlist mailing list
GiDlist at listas.cimne.upc.edu
http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20130702/f5932c2e/attachment-0001.htm
tom.probst at tuhh.de

[GiDlist] How to parameterize the geometry of a GiD model?

Post by tom.probst at tuhh.de »

Hi all,

I would like to know if it is possible to parameterize the geometry of a
GiD model. For example after modelling a cube I want to assign a parameter
to the side length of the cube.

Thanks a lot for your help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20130703/ed754613/attachment.htm
User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

[GiDlist] How to parameterize the geometry of a GiD model?

Post by escolano »

No, it is not possible this parametrization.

What you can do for simple cases is to create a Tcl procedure that build the geometry that you want, based on your parameters (e.g. cube sizes),
and then you can invoke this procedure with the parameters you want

Enrique Escolano
----- Original Message -----
From: tom.probst at tuhh.de
To: gidlist at listas.cimne.upc.edu
Sent: Wednesday, July 03, 2013 2:58 PM
Subject: [GiDlist] How to parameterize the geometry of a GiD model?


Hi all,

I would like to know if it is possible to parameterize the geometry of a GiD model. For example after modelling a cube I want to assign a parameter to the side length of the cube.

Thanks a lot for your help!



------------------------------------------------------------------------------


_______________________________________________
GiDlist mailing list
GiDlist at listas.cimne.upc.edu
http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20130703/64635df2/attachment.htm
Guillaume De Nayer

[GiDlist] Import a structured grid (X,Y,Z coordinates) into

Post by Guillaume De Nayer »

Hi,

I'm new on this list, but I'm using GiD for 2 years.

Here is my problem:
I have a file containing a structured grid (just the X, Y, Z
coordinates). I can import this file into GiD, but I get only the nodes
shown.

Is it possible to generate a structured grid from the given coordinates
in the file in GiD ?

If yes, what must be done ?

Best Regards,
Guillaume
User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

[GiDlist] Import a structured grid (X, Y, Z coordinates) int

Post by escolano »

The option to create the structured grid of quadrilaterals from a file with XYZ coordinates not exists, because in general these XYZ could be unstructured.

But importing XYZ files exists an option to create a Delaunay mesh of triangles that connect your points. This option is more general and works also for unstructured clouds of points.
You can convert the XYZ into geometrical or mesh entities (Files-Import-XYZ points or Files-Import-XYZ nodes)

To create the triangles, in the window that select the filename you must click the "Import options" arrow, and select the "Triangulate" checkbox
(Note: the triangulation is created projecting the 3D coordinates to the Z=0 plane)

A tool that could be interesting to you is Geometry-Create-NURBS surface-By points..., and select the points.
It create a NURBS surface that approximate smoothly a cloud of irregular points, and you can remesh this surface again to have a structured mesh of quadrilaterals.

Finally, with Tcl/Tk scripting it is relativelly easy to read a XYZ ASCII file, and create the structured mesh, assumig that the XYZ are structured also.
This is a procedure that to this, (in fact is a little more general, because it accepts if the rectangle of the XYZ grid are rotated an angle in the XY plane)
I copy two procedures, one that really do the task, and another that allow you to select the filename with a filebrowser window.

#assumed that is a grid (can be rotated) in x,y and try to detect
#the number of rows, cols and rotation angle
proc ReadGridRotated { filename } {
variable RAD_TO_DEGREE
if { ![file exists $filename] } {
return 1
}
set fp [open $filename r]
set all [split [read $fp] \n]
close $fp
set prevnpoin [GiD_Info mesh MaxNumNodes]
set xprev ""
set d2ref 0
set nx -1
set i 1
foreach line $all {
if { $line == "" } continue
foreach {x y z} $line break
if { ![string is double $z] || $z == "" } {
set z 0
} else {
set z [expr -1*$z]
}
GiD_Mesh create node append "$x $y $z"
if { $nx== -1 && $xprev != "" } {
set d2 [expr {($x-$xprev)*($x-$xprev)+($y-$yprev)*($y-$yprev)}]
if { $d2ref == 0 } {
set d2ref [expr {$d2*1.1}]
} else {
if { $d2$d2ref } {
set nx [expr {$i-1}]
}
}
}
set xprev $x
set yprev $y
incr i
}

unset all

set newnpoin [expr {[GiD_Info mesh MaxNumNodes]-$prevnpoin}]
set ny [expr {$newnpoin/$nx}]
set p1 [GiD_Info mesh nodes [expr {$prevnpoin+1}]]
set p2 [GiD_Info mesh nodes [expr {$prevnpoin+$nx}]]
set vx [expr {[lindex $p2 1]-[lindex $p1 1]}]
set vy [expr {[lindex $p2 2]-[lindex $p1 2]}]
set angle [expr {acos(double($vx)/sqrt($vx*$vx+$vy*$vy))*$RAD_TO_DEGREE}]
set et quadrilateral
set nn 4

for { set j 1 } { $j$ny } { incr j } {
for { set i 1 } { $i$nx } { incr i } {
set p [expr {($j-1)*$nx+$i+$prevnpoin}]
GiD_Mesh create element append $et $nn "$p [expr {$p+1}] [expr {$p+$nx+1}] [expr {$p+$nx}]"
}
}

return [list $nx $ny $angle]
}

proc ReadGridRotatedWindow { } {
variable gridfilename
if { ![info exists gridfilename] } {
set gridfilename ""
}
set types [list [list [= "Grid ASCII file"] ".dat"] [list [_ "All files"] ".*"]]
set defaultextension .dat
set title [= "Read grid ASCII file"]
set gridfilename [Browser-ramR file read .gid $title $gridfilename $types $defaultextension 0]
if { $gridfilename != "" } {
set t0 [clock seconds]
GidUtils::WaitState .
set res [ReadGridRotated $gridfilename]
foreach "nx ny angle" $res break
GidUtils::EndWaitState .
GidUtils::SetWarnLine [= "Time= %s seconds, %sx%s angle=%s degrees" \
[expr [clock seconds]-$t0] $nx $ny $angle]
if { [GiD_Info project ViewMode] != "MESHUSE" } {
GiD_Process Mescape Meshing MeshView escape
}
GiD_Process Zoom Frame
#GiD_Redraw
}
}

#invoke the window
ReadGridRotatedWindow


You can create for example add a macro button to the macro buttons toolbar and paste my blue code to be invoked by this button.

Another simple way to test it is to save the blue code in a file (e.g. in "C:\tmp\myfile.tcl"), and write this in the lower command line of GiD to load it:
-np- source {C:\tmp\myfile.tcl}


Regards

Enrique Escolano

----- Original Message -----
From: "Guillaume De Nayer" denayer at hsu-hh.de
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, July 09, 2013 2:30 PM
Subject: [GiDlist] Import a structured grid (X,Y,Z coordinates) into GiD


Hi,

I'm new on this list, but I'm using GiD for 2 years.

Here is my problem:
I have a file containing a structured grid (just the X, Y, Z
coordinates). I can import this file into GiD, but I get only the nodes
shown.

Is it possible to generate a structured grid from the given coordinates
in the file in GiD ?

If yes, what must be done ?

Best Regards,
Guillaume
_______________________________________________
GiDlist mailing list
GiDlist at listas.cimne.upc.edu
http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20130709/be60dac6/attachment.htm
Post Reply