[GiDlist] (no subject)

Dear GiD team,
I am one of the GiD user. I wonder If I can post my question in your forum.
Actually, I have results from OpenSees and it is .txt format. But I wanna
see the result in GiD. I have already created the mesh in GiD and used it
in Opensees. But I do not know how I can change the txt format to GiD
format to visualize it.
Many thanks for your help!

Bahareh


Bahareh Mobasher
Ph.D. Candidate.
University of California, Irvine
The Henry Samueli School of Engineering
Civil and Environmental Engineering Department

I don’t know well OpenSees, but I think that there is some possibility to
write the results in VTK format (directly or using some additional result
converter)

Then we have implemented a plugin to be able to read this VTK files in GiD
postprocess.
If do you want, I can provide this plugin, available now for Windows x32 and
Windows x64.
(probably this plugin will be included by default in the next GiD beta
version 10.2.0b)

Regards

Enrique Escolano

----- Original Message -----
From: “Bahareh Mobasher” bmobashe at uci.edu
To: gidlist at listas.cimne.upc.edu
Sent: Thursday, January 26, 2012 3:45 AM
Subject: [GiDlist] (no subject)


Dear GiD team,
I am one of the GiD user. I wonder If I can post my question in your
forum.
Actually, I have results from OpenSees and it is .txt format. But I wanna
see the result in GiD. I have already created the mesh in GiD and used it
in Opensees. But I do not know how I can change the txt format to GiD
format to visualize it.
Many thanks for your help!
Bahareh

Bahareh Mobasher
Ph.D. Candidate.
University of California, Irvine
The Henry Samueli School of Engineering
Civil and Environmental Engineering Department


GiDlist mailing list
GiDlist at listas.cimne.upc.edu
_http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist_

Hi,
Thanks for your email. I would be happy to have that. But does it change the txt format to GiD automatically?

Thanks,
Bahareh


On Jan 26, 2012, at 3:00 AM, gidlist-request at listas.cimne.upc.edu wrote:

Send GiDlist mailing list submissions to
gidlist at listas.cimne.upc.edu
To subscribe or unsubscribe via the World Wide Web, visit
_http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist_
or, via email, send a message with subject or body ‘help’ to
gidlist-request at listas.cimne.upc.edu
You can reach the person managing the list at
gidlist-owner at listas.cimne.upc.edu
When replying, please edit your Subject line so it is more specific
than “Re: Contents of GiDlist digest…”

Today’s Topics:
1. (no subject) (Bahareh Mobasher)
2. Open FOAM - VTK results (Enrique Escolano)

----------------------------------------------------------------------
Message: 1
Date: Wed, 25 Jan 2012 18:45:14 -0800
From: “Bahareh Mobasher” bmobashe at uci.edu
Subject: [GiDlist] (no subject)
To: gidlist at listas.cimne.upc.edu
Message-ID:
b77c962bc4609c118fd73a47aca4cdc1.squirrel at webmail.uci.edu
Content-Type: text/plain;charset=iso-8859-1
Dear GiD team,
I am one of the GiD user. I wonder If I can post my question in your forum.
Actually, I have results from OpenSees and it is .txt format. But I wanna
see the result in GiD. I have already created the mesh in GiD and used it
in Opensees. But I do not know how I can change the txt format to GiD
format to visualize it.
Many thanks for your help!
Bahareh

Bahareh Mobasher
Ph.D. Candidate.
University of California, Irvine
The Henry Samueli School of Engineering
Civil and Environmental Engineering Department


------------------------------
Message: 2
Date: Thu, 26 Jan 2012 11:45:03 +0100
From: “Enrique Escolano” escolano at cimne.upc.edu
Subject: [GiDlist] Open FOAM - VTK results
To: gidlist at listas.cimne.upc.edu
Message-ID: 500A8F8E39E749C3A80AA2F4C205E8DD at mediador
Content-Type: text/plain; format=flowed; charset=“iso-8859-1”;
reply-type=original
I don’t know well OpenSees, but I think that there is some possibility to
write the results in VTK format (directly or using some additional result
converter)
Then we have implemented a plugin to be able to read this VTK files in GiD
postprocess.
If do you want, I can provide this plugin, available now for Windows x32 and
Windows x64.
(probably this plugin will be included by default in the next GiD beta
version 10.2.0b)
Regards
Enrique Escolano
----- Original Message -----
From: “Bahareh Mobasher” bmobashe at uci.edu
To: gidlist at listas.cimne.upc.edu
Sent: Thursday, January 26, 2012 3:45 AM
Subject: [GiDlist] (no subject)

Dear GiD team,
I am one of the GiD user. I wonder If I can post my question in your
forum.
Actually, I have results from OpenSees and it is .txt format. But I wanna
see the result in GiD. I have already created the mesh in GiD and used it
in Opensees. But I do not know how I can change the txt format to GiD
format to visualize it.
Many thanks for your help!
Bahareh

Bahareh Mobasher
Ph.D. Candidate.
University of California, Irvine
The Henry Samueli School of Engineering
Civil and Environmental Engineering Department


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_

End of GiDlist Digest, Vol 18, Issue 5
**************************************

No, our plugin allow to read VTK result files in GiD.

But as I pointed I think that it is possible for you to convert your txt
OpenFOAM files into VTK files

In the OpenFOAM distribution there is a ‘foamToVTK’ utility that you could
compile as a small executable to do this conversion from the command line

its source code is in this folder of OpenFOAM distribution (e.g.)
OpenFOAM-1.7.1\applications\utilities\postProcessing\dataConversion\foamToVTK

Enrique

----- Original Message -----
From: “Bahareh Mobasher” bmobashe at uci.edu
To: gidlist at listas.cimne.upc.edu
Sent: Thursday, January 26, 2012 6:06 PM
Subject: Re: [GiDlist] GiDlist Digest, Vol 18, Issue 5


Hi,
Thanks for your email. I would be happy to have that. But does it change
the txt format to GiD automatically?
Thanks,
Bahareh

On Jan 26, 2012, at 3:00 AM, gidlist-request at listas.cimne.upc.edu wrote:
Send GiDlist mailing list submissions to
gidlist at listas.cimne.upc.edu
To subscribe or unsubscribe via the World Wide Web, visit
_http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist_
or, via email, send a message with subject or body ‘help’ to
gidlist-request at listas.cimne.upc.edu
You can reach the person managing the list at
gidlist-owner at listas.cimne.upc.edu
When replying, please edit your Subject line so it is more specific
than “Re: Contents of GiDlist digest…”

Today’s Topics:
1. (no subject) (Bahareh Mobasher)
2. Open FOAM - VTK results (Enrique Escolano)

----------------------------------------------------------------------
Message: 1
Date: Wed, 25 Jan 2012 18:45:14 -0800
From: “Bahareh Mobasher” bmobashe at uci.edu
Subject: [GiDlist] (no subject)
To: gidlist at listas.cimne.upc.edu
Message-ID:
b77c962bc4609c118fd73a47aca4cdc1.squirrel at webmail.uci.edu
Content-Type: text/plain;charset=iso-8859-1
Dear GiD team,
I am one of the GiD user. I wonder If I can post my question in your
forum.
Actually, I have results from OpenSees and it is .txt format. But I wanna
see the result in GiD. I have already created the mesh in GiD and used it
in Opensees. But I do not know how I can change the txt format to GiD
format to visualize it.
Many thanks for your help!
Bahareh

Bahareh Mobasher
Ph.D. Candidate.
University of California, Irvine
The Henry Samueli School of Engineering
Civil and Environmental Engineering Department


------------------------------
Message: 2
Date: Thu, 26 Jan 2012 11:45:03 +0100
From: “Enrique Escolano” escolano at cimne.upc.edu
Subject: [GiDlist] Open FOAM - VTK results
To: gidlist at listas.cimne.upc.edu
Message-ID: 500A8F8E39E749C3A80AA2F4C205E8DD at mediador
Content-Type: text/plain; format=flowed; charset=“iso-8859-1”;
reply-type=original
I don’t know well OpenSees, but I think that there is some possibility to
write the results in VTK format (directly or using some additional result
converter)
Then we have implemented a plugin to be able to read this VTK files in
GiD
postprocess.
If do you want, I can provide this plugin, available now for Windows x32
and
Windows x64.
(probably this plugin will be included by default in the next GiD beta
version 10.2.0b)
Regards
Enrique Escolano
----- Original Message -----
From: “Bahareh Mobasher” bmobashe at uci.edu
To: gidlist at listas.cimne.upc.edu
Sent: Thursday, January 26, 2012 3:45 AM
Subject: [GiDlist] (no subject)

Dear GiD team,
I am one of the GiD user. I wonder If I can post my question in your
forum.
Actually, I have results from OpenSees and it is .txt format. But I
wanna
see the result in GiD. I have already created the mesh in GiD and used
it
in Opensees. But I do not know how I can change the txt format to GiD
format to visualize it.
Many thanks for your help!
Bahareh

Bahareh Mobasher
Ph.D. Candidate.
University of California, Irvine
The Henry Samueli School of Engineering
Civil and Environmental Engineering Department


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_

End of GiDlist Digest, Vol 18, Issue 5
**************************************


GiDlist mailing list
GiDlist at listas.cimne.upc.edu
_http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist_

Dear GID team,

I am trying to run an analysis where some of the elements are
progressivley “killed”. I would like to show results only for those
elements that are still “alive”, and completely remove from the
visualisation those that are “dead”. Is there a way to do this?

Many thanks,

Jose


Jose J Munoz, http://www-lacan.upc.es/munoz/
Laboratori de Càlcul Numèric (LaCàN)
Dep. Matemàtica Aplicada III
C/ Comte d’Urgell, 187, Room 1D012
Campus Urgell UPC, Edifici EUETIB
E-08036 Barcelona, Spain
j.munoz at upc.edu, Skype: josej.munoz, Tel. + 34 93 413 7253

Hello,
to do this you have three options:

1- do not write results for the ‘dead elements’. When doing a c.fill,
elements with no results will not be drawn;

2- write a new mesh for each time step with the ‘dead elements’ removed;

3- write a ‘deformation’ result so that the nodes of the ‘dead elements’
fall ‘outside’ the current view, i.e. are moved far away.

Best regards,

Miguel Pasenau

-----Mensaje original-----
De: gidlist-bounces at listas.cimne.upc.edu
[mailto:gidlist-bounces at listas.cimne.upc.edu] En nombre de Jose Munoz
Enviado el: jueves, 23 de febrero de 2012 16:48
Para: gidlist at listas.cimne.upc.edu
Asunto: [GiDlist] Remove dead elements from results visualisation

Dear GID team,

I am trying to run an analysis where some of the elements are
progressivley “killed”. I would like to show results only for those
elements that are still “alive”, and completely remove from the
visualisation those that are “dead”. Is there a way to do this?

Many thanks,

Jose


Jose J Munoz, http://www-lacan.upc.es/munoz/
Laboratori de Càlcul Numèric (LaCàN)
Dep. Matemàtica Aplicada III
C/ Comte d’Urgell, 187, Room 1D012
Campus Urgell UPC, Edifici EUETIB
E-08036 Barcelona, Spain
j.munoz at upc.edu, Skype: josej.munoz, Tel. + 34 93 413 7253


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

Hello,

I have two kinds of materials in my code: soil materials and concrete
materials. Is there a way to ask GiD to loop only soil materials at
one stage and loop concrete materials at another time in the .bas file
instead of having the command Loop materials which will cover all
soils and concretes? Can I use the set command to select only the soil
/ concrete materials?

Thank You,
Arash

You can do two loops, and inside take in account only the kind of material
you want
And you can have in the material a hidden field, named for example ‘class’,
to identify its category
MATERIAL:xxx
Question:class
Value:soil
State:hidden

END MATERIAL

*loop materials
*if(strcmp(Matprop(class),“soil”)==0)
write its properties
*endif
*end materials
*loop materials
*if(strcmp(Matprop(class),“concrete”)==0)
write its properties
*endif
*end materials
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, January 31, 2012 10:05 PM
Subject: [GiDlist] Set Materials


Hello,
I have two kinds of materials in my code: soil materials and concrete
materials. Is there a way to ask GiD to loop only soil materials at
one stage and loop concrete materials at another time in the .bas file
instead of having the command Loop materials which will cover all
soils and concretes? Can I use the set command to select only the soil
/ concrete materials?
Thank You,
Arash


GiDlist mailing list
GiDlist at listas.cimne.upc.edu
_http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist_

Thank You very much,

I have another qustion. I have two types of elements, hexahedron and
rectangular. Can I set element type for each one and loop the nodes of
each one? I want to have all the nodes of hexahedron elements only in
one file and all the nodes of the rectangular elements only in another
file.

Best Regards,
Arash

On Wed, Feb 1, 2012 at 4:37 AM, Enrique Escolano escolano at cimne.upc.edu wrote:
You can do two loops, and inside take in account only the kind of material
you want
And you can have in the material a hidden field, named for example ‘class’,
to identify its category
MATERIAL:xxx
Question:class
Value:soil
State:hidden

END MATERIAL
*loop materials
*if(strcmp(Matprop(class),“soil”)==0)
write its properties
*endif
*end materials
*loop materials
*if(strcmp(Matprop(class),“concrete”)==0)
write its properties
*endif
*end materials
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, January 31, 2012 10:05 PM
Subject: [GiDlist] Set Materials

Hello,
I have two kinds of materials in my code: soil materials and concrete
materials. Is there a way to ask GiD to loop only soil materials at
one stage and loop concrete materials at another time in the .bas file
instead of having the command Loop materials which will cover all
soils and concretes? Can I use the set command to select only the soil
/ concrete materials?
Thank You,
Arash


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_

No, you can’t do a loop on the nodes of a type of elements with simple .bas commands.
you can do the loop on the elements of a type, and inside write all its nodes, but then you will obtain the list of nodes of this kind of element, but with repetitions.

to do this kind of special thinks you must go to Tcl scripting level. You can define a tcl procedure (inside a problemtype.tcl file it is automatically sourced) that
return what you want (the list of nodes of a type of element unrepeated)

You can invoke this Tcl procedure from the .bas file, with a *tcl(your_procedure) command, then the value returned by the procedure is directly printed in the output file.

This is an example of the procedure you need to write in your problemtype.tcl file

proc Example_GetNodesOfElementType { element_type } {
set nodes

  • foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type -array] 0] 2] {
    lappend nodes {*}$item
    }
    set nodes [lsort -integer -unique $nodes]
    return $nodes
    }

GiD_Info Mesh is a special GiD-Tcl command (you can see the its syntax at GiD Help (GiD Customization - Tcl/Tk extension)
the rest is Tcl standard scripting language (can see documentation on Internet, and also in the help of Ramdebugger that is our Tcl/Tk editor and debugger), could open RamDebugger from the menu Data-Problemtype-Debugger…

and in the .bas file you must write something like this:

Hexahedra nodes:
*tcl(Example_GetNodesOfElementType Hexahedra)
Quadrilateral nodes:
*tcl(Example_GetNodesOfElementType Quadrilateral)

Note that I prefixed the Tcl procedure with ‘Example’, to avoid conflicts with other possible Tcl procedure that could use the same name GetNodesOfElementType
I recommend you to use a prefix or namespace related with the name of your problemtype.


Note: you can obtain multiple .dat output files, writting multiple .bas templates. a increasing number if added to the name of each .dat file (and templates are evaluated sorted alphabetically by its name)

Regards

Enrique

----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, February 14, 2012 12:45 AM
Subject: Re: [GiDlist] Set Materials


Thank You very much,

I have another qustion. I have two types of elements, hexahedron and
rectangular. Can I set element type for each one and loop the nodes of
each one? I want to have all the nodes of hexahedron elements only in
one file and all the nodes of the rectangular elements only in another
file.

Best Regards,
Arash

On Wed, Feb 1, 2012 at 4:37 AM, Enrique Escolano escolano at cimne.upc.edu wrote:
You can do two loops, and inside take in account only the kind of material
you want
And you can have in the material a hidden field, named for example ‘class’,
to identify its category
MATERIAL:xxx
Question:class
Value:soil
State:hidden

END MATERIAL
*loop materials
*if(strcmp(Matprop(class),“soil”)==0)
write its properties
*endif
*end materials
*loop materials
*if(strcmp(Matprop(class),“concrete”)==0)
write its properties
*endif
*end materials
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, January 31, 2012 10:05 PM
Subject: [GiDlist] Set Materials

Hello,
I have two kinds of materials in my code: soil materials and concrete
materials. Is there a way to ask GiD to loop only soil materials at
one stage and loop concrete materials at another time in the .bas file
instead of having the command Loop materials which will cover all
soils and concretes? Can I use the set command to select only the soil
/ concrete materials?
Thank You,
Arash


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/20120214/3b95346f/attachment.htm

Hello,

I made a .tcl file in my problem type containing:

proc Example_GetNodesOfElementType { element_type } {
set nodes

  • foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
    -array] 0] 2] {
    lappend nodes {*}$item
    }
    set nodes [lsort -integer -unique $nodes]
    return $nodes
    }

and in my .bas file,

I have written
*tcl(Example_GetNodesOfElementType Hexahedra)
*NodesNum *NodesCoord

to get the nodal coordinates all hexahedra elements. It is not working
and it gives the error:
Error in base file C:/Program Files/GiD/GiD 9.0.2/problemtypes/FLODEF
V11.gid/FLODEF V11-post.bas at line number 3: Error in TCL expression:
‘invalid command name “Example_GetNodesOfElement_Type”’

I would be happy to have your comment.

Thank You,
Arash Farzam

On Tue, Feb 14, 2012 at 4:22 AM, Enrique Escolano
escolano at cimne.upc.edu wrote:
No, you can’t do a loop on the nodes of a type of elements with simple .bas
commands.
you can do the loop on the elements of a type, and inside write all its
nodes, but then you will obtain the list of nodes of this kind of element,
but with repetitions.
to do this kind of special thinks you must go to Tcl scripting level. You
can define a tcl procedure (inside a problemtype.tcl file it is
automatically sourced) that
return what you want (the list of nodes of a type of element unrepeated)
You can invoke this Tcl procedure from the .bas file, with a
*tcl(your_procedure) command, then the value returned by the procedure is
directly printed in the output file.
This is an example of the procedure you need to write in your
problemtype.tcl file
proc Example_GetNodesOfElementType { element_type } {
set nodes

  • __ foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
    -array] 0] 2] {
    lappend nodes {*}$item
    }
    set nodes [lsort -integer -unique $nodes]
    return $nodes
    }
    GiD_Info Mesh is a special GiD-Tcl command (you can see the its syntax at
    GiD Help (GiD Customization - Tcl/Tk extension)
    the rest is Tcl standard scripting language (can see documentation on
    Internet, and also in the help of Ramdebugger that is our Tcl/Tk editor and
    debugger), could open RamDebugger from the menu
    Data-Problemtype-Debugger…
    and in the .bas file you must write something like this:
    Hexahedra nodes:
    *tcl(Example_GetNodesOfElementType Hexahedra)
    Quadrilateral nodes:
    *tcl(Example_GetNodesOfElementType Quadrilateral)
    Note that I prefixed the Tcl procedure with ‘Example’, to avoid conflicts
    with other possible Tcl procedure that could use the same name
    GetNodesOfElementType
    I recommend you to use a prefix or namespace related with the name of your
    problemtype.

Note: you can obtain multiple .dat output files, writting multiple .bas
templates. a increasing number if added to the name of each .dat file (and
templates are evaluated sorted alphabetically by its name)
Regards
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, February 14, 2012 12:45 AM
Subject: Re: [GiDlist] Set Materials
Thank You very much,
I have another qustion. I have two types of elements, hexahedron and
rectangular. Can I set element type for each one and loop the nodes of
each one? I want to have all the nodes of hexahedron elements only in
one file and all the nodes of the rectangular elements only in another
file.
Best Regards,
Arash
On Wed, Feb 1, 2012 at 4:37 AM, Enrique Escolano escolano at cimne.upc.edu
wrote:
You can do two loops, and inside take in account only the kind of material
you want
And you can have in the material a hidden field, named for example
‘class’,
to identify its category
MATERIAL:xxx
Question:class
Value:soil
State:hidden

END MATERIAL
*loop materials
*if(strcmp(Matprop(class),“soil”)==0)
write its properties
*endif
*end materials
*loop materials
*if(strcmp(Matprop(class),“concrete”)==0)
write its properties
*endif
*end materials
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, January 31, 2012 10:05 PM
Subject: [GiDlist] Set Materials

Hello,
I have two kinds of materials in my code: soil materials and concrete
materials. Is there a way to ask GiD to loop only soil materials at
one stage and loop concrete materials at another time in the .bas file
instead of having the command Loop materials which will cover all
soils and concretes? Can I use the set command to select only the soil
/ concrete materials?
Thank You,
Arash


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_


GiDlist mailing list
GiDlist at listas.cimne.upc.edu
_http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist_

In order to be automatically sourced by GiD, the name of the tcl file must
be "FLODEF V11.tcl "
(the same as the problemtype and .tcl extension)

Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 20, 2012 7:08 PM
Subject: Re: [GiDlist] Set Materials


Hello,

I made a .tcl file in my problem type containing:

proc Example_GetNodesOfElementType { element_type } {
set nodes

  • foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
    -array] 0] 2] {
    lappend nodes {*}$item
    }
    set nodes [lsort -integer -unique $nodes]
    return $nodes
    }

and in my .bas file,

I have written
*tcl(Example_GetNodesOfElementType Hexahedra)
*NodesNum *NodesCoord

to get the nodal coordinates all hexahedra elements. It is not working
and it gives the error:
Error in base file C:/Program Files/GiD/GiD 9.0.2/problemtypes/FLODEF
V11.gid/FLODEF V11-post.bas at line number 3: Error in TCL expression:
‘invalid command name “Example_GetNodesOfElement_Type”’

I would be happy to have your comment.

Thank You,
Arash Farzam

On Tue, Feb 14, 2012 at 4:22 AM, Enrique Escolano
escolano at cimne.upc.edu wrote:
No, you can’t do a loop on the nodes of a type of elements with simple
.bas
commands.
you can do the loop on the elements of a type, and inside write all its
nodes, but then you will obtain the list of nodes of this kind of element,
but with repetitions.
to do this kind of special thinks you must go to Tcl scripting level. You
can define a tcl procedure (inside a problemtype.tcl file it is
automatically sourced) that
return what you want (the list of nodes of a type of element unrepeated)
You can invoke this Tcl procedure from the .bas file, with a
*tcl(your_procedure) command, then the value returned by the procedure is
directly printed in the output file.
This is an example of the procedure you need to write in your
problemtype.tcl file
proc Example_GetNodesOfElementType { element_type } {
set nodes

  • __ foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
    -array] 0] 2] {
    lappend nodes {*}$item
    }
    set nodes [lsort -integer -unique $nodes]
    return $nodes
    }
    GiD_Info Mesh is a special GiD-Tcl command (you can see the its syntax at
    GiD Help (GiD Customization - Tcl/Tk extension)
    the rest is Tcl standard scripting language (can see documentation on
    Internet, and also in the help of Ramdebugger that is our Tcl/Tk editor
    and
    debugger), could open RamDebugger from the menu
    Data-Problemtype-Debugger…
    and in the .bas file you must write something like this:
    Hexahedra nodes:
    *tcl(Example_GetNodesOfElementType Hexahedra)
    Quadrilateral nodes:
    *tcl(Example_GetNodesOfElementType Quadrilateral)
    Note that I prefixed the Tcl procedure with ‘Example’, to avoid conflicts
    with other possible Tcl procedure that could use the same name
    GetNodesOfElementType
    I recommend you to use a prefix or namespace related with the name of your
    problemtype.

Note: you can obtain multiple .dat output files, writting multiple .bas
templates. a increasing number if added to the name of each .dat file (and
templates are evaluated sorted alphabetically by its name)
Regards
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, February 14, 2012 12:45 AM
Subject: Re: [GiDlist] Set Materials
Thank You very much,
I have another qustion. I have two types of elements, hexahedron and
rectangular. Can I set element type for each one and loop the nodes of
each one? I want to have all the nodes of hexahedron elements only in
one file and all the nodes of the rectangular elements only in another
file.
Best Regards,
Arash
On Wed, Feb 1, 2012 at 4:37 AM, Enrique Escolano escolano at cimne.upc.edu
wrote:
You can do two loops, and inside take in account only the kind of
material
you want
And you can have in the material a hidden field, named for example
‘class’,
to identify its category
MATERIAL:xxx
Question:class
Value:soil
State:hidden

END MATERIAL
*loop materials
*if(strcmp(Matprop(class),“soil”)==0)
write its properties
*endif
*end materials
*loop materials
*if(strcmp(Matprop(class),“concrete”)==0)
write its properties
*endif
*end materials
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, January 31, 2012 10:05 PM
Subject: [GiDlist] Set Materials

Hello,
I have two kinds of materials in my code: soil materials and concrete
materials. Is there a way to ask GiD to loop only soil materials at
one stage and loop concrete materials at another time in the .bas file
instead of having the command Loop materials which will cover all
soils and concretes? Can I use the set command to select only the soil
/ concrete materials?
Thank You,
Arash


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_


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

Yes, actually I have named it the same. I just wrote problem type in
the email for avoiding confusion. But still, I get the same error.

Thanks,
Arash

On Mon, Feb 20, 2012 at 12:35 PM, Enrique Escolano
escolano at cimne.upc.edu wrote:
In order to be automatically sourced by GiD, the name of the tcl file must
be "FLODEF V11.tcl "
(the same as the problemtype and .tcl extension)
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 20, 2012 7:08 PM
Subject: Re: [GiDlist] Set Materials

Hello,
I made a .tcl file in my problem type containing:
proc Example_GetNodesOfElementType { element_type } {
set nodes

  • __ foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
    -array] 0] 2] {
    lappend nodes {*}$item
    }
    set nodes [lsort -integer -unique $nodes]
    return $nodes
    }
    and in my .bas file,
    I have written
    *tcl(Example_GetNodesOfElementType Hexahedra)
    *NodesNum *NodesCoord
    to get the nodal coordinates all hexahedra elements. It is not working
    and it gives the error:
    Error in base file C:/Program Files/GiD/GiD 9.0.2/problemtypes/FLODEF
    V11.gid/FLODEF V11-post.bas at line number 3: Error in TCL expression:
    ‘invalid command name “Example_GetNodesOfElement_Type”’
    I would be happy to have your comment.
    Thank You,
    Arash Farzam
    On Tue, Feb 14, 2012 at 4:22 AM, Enrique Escolano
    escolano at cimne.upc.edu wrote:
    No, you can’t do a loop on the nodes of a type of elements with simple
    .bas
    commands.
    you can do the loop on the elements of a type, and inside write all its
    nodes, but then you will obtain the list of nodes of this kind of element,
    but with repetitions.
    to do this kind of special thinks you must go to Tcl scripting level. You
    can define a tcl procedure (inside a problemtype.tcl file it is
    automatically sourced) that
    return what you want (the list of nodes of a type of element unrepeated)
    You can invoke this Tcl procedure from the .bas file, with a
    *tcl(your_procedure) command, then the value returned by the procedure is
    directly printed in the output file.
    This is an example of the procedure you need to write in your
    problemtype.tcl file
    proc Example_GetNodesOfElementType { element_type } {
    set nodes
    • __ foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
      -array] 0] 2] {
      lappend nodes {*}$item
      }
      set nodes [lsort -integer -unique $nodes]
      return $nodes
      }
      GiD_Info Mesh is a special GiD-Tcl command (you can see the its syntax at
      GiD Help (GiD Customization - Tcl/Tk extension)
      the rest is Tcl standard scripting language (can see documentation on
      Internet, and also in the help of Ramdebugger that is our Tcl/Tk editor
      and
      debugger), could open RamDebugger from the menu
      Data-Problemtype-Debugger…
      and in the .bas file you must write something like this:
      Hexahedra nodes:
      *tcl(Example_GetNodesOfElementType Hexahedra)
      Quadrilateral nodes:
      *tcl(Example_GetNodesOfElementType Quadrilateral)
      Note that I prefixed the Tcl procedure with ‘Example’, to avoid conflicts
      with other possible Tcl procedure that could use the same name
      GetNodesOfElementType
      I recommend you to use a prefix or namespace related with the name of your
      problemtype.

Note: you can obtain multiple .dat output files, writting multiple .bas
templates. a increasing number if added to the name of each .dat file (and
templates are evaluated sorted alphabetically by its name)
Regards
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, February 14, 2012 12:45 AM
Subject: Re: [GiDlist] Set Materials
Thank You very much,
I have another qustion. I have two types of elements, hexahedron and
rectangular. Can I set element type for each one and loop the nodes of
each one? I want to have all the nodes of hexahedron elements only in
one file and all the nodes of the rectangular elements only in another
file.
Best Regards,
Arash
On Wed, Feb 1, 2012 at 4:37 AM, Enrique Escolano escolano at cimne.upc.edu
wrote:
You can do two loops, and inside take in account only the kind of
material
you want
And you can have in the material a hidden field, named for example
‘class’,
to identify its category
MATERIAL:xxx
Question:class
Value:soil
State:hidden

END MATERIAL
*loop materials
*if(strcmp(Matprop(class),“soil”)==0)
write its properties
*endif
*end materials
*loop materials
*if(strcmp(Matprop(class),“concrete”)==0)
write its properties
*endif
*end materials
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, January 31, 2012 10:05 PM
Subject: [GiDlist] Set Materials

Hello,
I have two kinds of materials in my code: soil materials and concrete
materials. Is there a way to ask GiD to loop only soil materials at
one stage and loop concrete materials at another time in the .bas file
instead of having the command Loop materials which will cover all
soils and concretes? Can I use the set command to select only the soil
/ concrete materials?
Thank You,
Arash


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_


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_

I attach a simple problemtype that works well

----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 20, 2012 7:58 PM
Subject: Re: [GiDlist] Set Materials


Yes, actually I have named it the same. I just wrote problem type in
the email for avoiding confusion. But still, I get the same error.

Thanks,
Arash

On Mon, Feb 20, 2012 at 12:35 PM, Enrique Escolano
escolano at cimne.upc.edu wrote:
In order to be automatically sourced by GiD, the name of the tcl file must
be "FLODEF V11.tcl "
(the same as the problemtype and .tcl extension)
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 20, 2012 7:08 PM
Subject: Re: [GiDlist] Set Materials

Hello,
I made a .tcl file in my problem type containing:
proc Example_GetNodesOfElementType { element_type } {
set nodes

  • __ foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
    -array] 0] 2] {
    lappend nodes {*}$item
    }
    set nodes [lsort -integer -unique $nodes]
    return $nodes
    }
    and in my .bas file,
    I have written
    *tcl(Example_GetNodesOfElementType Hexahedra)
    *NodesNum *NodesCoord
    to get the nodal coordinates all hexahedra elements. It is not working
    and it gives the error:
    Error in base file C:/Program Files/GiD/GiD 9.0.2/problemtypes/FLODEF
    V11.gid/FLODEF V11-post.bas at line number 3: Error in TCL expression:
    ‘invalid command name “Example_GetNodesOfElement_Type”’
    I would be happy to have your comment.
    Thank You,
    Arash Farzam
    On Tue, Feb 14, 2012 at 4:22 AM, Enrique Escolano
    escolano at cimne.upc.edu wrote:
    No, you can’t do a loop on the nodes of a type of elements with simple
    .bas
    commands.
    you can do the loop on the elements of a type, and inside write all its
    nodes, but then you will obtain the list of nodes of this kind of
    element,
    but with repetitions.
    to do this kind of special thinks you must go to Tcl scripting level. You
    can define a tcl procedure (inside a problemtype.tcl file it is
    automatically sourced) that
    return what you want (the list of nodes of a type of element unrepeated)
    You can invoke this Tcl procedure from the .bas file, with a
    *tcl(your_procedure) command, then the value returned by the procedure is
    directly printed in the output file.
    This is an example of the procedure you need to write in your
    problemtype.tcl file
    proc Example_GetNodesOfElementType { element_type } {
    set nodes
    • __ foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
      -array] 0] 2] {
      lappend nodes {*}$item
      }
      set nodes [lsort -integer -unique $nodes]
      return $nodes
      }
      GiD_Info Mesh is a special GiD-Tcl command (you can see the its syntax at
      GiD Help (GiD Customization - Tcl/Tk extension)
      the rest is Tcl standard scripting language (can see documentation on
      Internet, and also in the help of Ramdebugger that is our Tcl/Tk editor
      and
      debugger), could open RamDebugger from the menu
      Data-Problemtype-Debugger…
      and in the .bas file you must write something like this:
      Hexahedra nodes:
      *tcl(Example_GetNodesOfElementType Hexahedra)
      Quadrilateral nodes:
      *tcl(Example_GetNodesOfElementType Quadrilateral)
      Note that I prefixed the Tcl procedure with ‘Example’, to avoid conflicts
      with other possible Tcl procedure that could use the same name
      GetNodesOfElementType
      I recommend you to use a prefix or namespace related with the name of
      your
      problemtype.

Note: you can obtain multiple .dat output files, writting multiple .bas
templates. a increasing number if added to the name of each .dat file
(and
templates are evaluated sorted alphabetically by its name)
Regards
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, February 14, 2012 12:45 AM
Subject: Re: [GiDlist] Set Materials
Thank You very much,
I have another qustion. I have two types of elements, hexahedron and
rectangular. Can I set element type for each one and loop the nodes of
each one? I want to have all the nodes of hexahedron elements only in
one file and all the nodes of the rectangular elements only in another
file.
Best Regards,
Arash
On Wed, Feb 1, 2012 at 4:37 AM, Enrique Escolano escolano at cimne.upc.edu
wrote:
You can do two loops, and inside take in account only the kind of
material
you want
And you can have in the material a hidden field, named for example
‘class’,
to identify its category
MATERIAL:xxx
Question:class
Value:soil
State:hidden

END MATERIAL
*loop materials
*if(strcmp(Matprop(class),“soil”)==0)
write its properties
*endif
*end materials
*loop materials
*if(strcmp(Matprop(class),“concrete”)==0)
write its properties
*endif
*end materials
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, January 31, 2012 10:05 PM
Subject: [GiDlist] Set Materials

Hello,
I have two kinds of materials in my code: soil materials and concrete
materials. Is there a way to ask GiD to loop only soil materials at
one stage and loop concrete materials at another time in the .bas file
instead of having the command Loop materials which will cover all
soils and concretes? Can I use the set command to select only the soil
/ concrete materials?
Thank You,
Arash


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_


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_


GiDlist mailing list
GiDlist at listas.cimne.upc.edu
http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist
-------------- next part --------------
A non-text attachment was scrubbed…
Name: FLODEF V11.rar
Type: application/octet-stream
Size: 488 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20120221/05c97cfd/attachment.obj

Hello,

I use the exact same problem type that you emailed me, but still, I
get the error:
Error in base file C:/Program Files/GiD/GiD 9.0.2/problemtypes/FLODEF
V11.gid/FLODEF V11-z.bas at line number 2: Error in TCL expression:
‘info Mesh Elements Elemtype ?first? ?last? ?-sublist? with
first,last0’

Do you know what the reason might be for this error?

Thank You,
Arash
On Tue, Feb 21, 2012 at 5:06 AM, Enrique Escolano
escolano at cimne.upc.edu wrote:
I attach a simple problemtype that works well

----- Original Message ----- From: “Farzam-Student,STW, Arash”
farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 20, 2012 7:58 PM
Subject: Re: [GiDlist] Set Materials

Yes, actually I have named it the same. I just wrote problem type in
the email for avoiding confusion. But still, I get the same error.
Thanks,
Arash
On Mon, Feb 20, 2012 at 12:35 PM, Enrique Escolano
escolano at cimne.upc.edu wrote:
In order to be automatically sourced by GiD, the name of the tcl file must
be "FLODEF V11.tcl "
(the same as the problemtype and .tcl extension)
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 20, 2012 7:08 PM
Subject: Re: [GiDlist] Set Materials

Hello,
I made a .tcl file in my problem type containing:
proc Example_GetNodesOfElementType { element_type } {
set nodes

  • __ foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
    -array] 0] 2] {
    lappend nodes {*}$item
    }
    set nodes [lsort -integer -unique $nodes]
    return $nodes
    }
    and in my .bas file,
    I have written
    *tcl(Example_GetNodesOfElementType Hexahedra)
    *NodesNum *NodesCoord
    to get the nodal coordinates all hexahedra elements. It is not working
    and it gives the error:
    Error in base file C:/Program Files/GiD/GiD 9.0.2/problemtypes/FLODEF
    V11.gid/FLODEF V11-post.bas at line number 3: Error in TCL expression:
    ‘invalid command name “Example_GetNodesOfElement_Type”’
    I would be happy to have your comment.
    Thank You,
    Arash Farzam
    On Tue, Feb 14, 2012 at 4:22 AM, Enrique Escolano
    escolano at cimne.upc.edu wrote:
    No, you can’t do a loop on the nodes of a type of elements with simple
    .bas
    commands.
    you can do the loop on the elements of a type, and inside write all its
    nodes, but then you will obtain the list of nodes of this kind of
    element,
    but with repetitions.
    to do this kind of special thinks you must go to Tcl scripting level. You
    can define a tcl procedure (inside a problemtype.tcl file it is
    automatically sourced) that
    return what you want (the list of nodes of a type of element unrepeated)
    You can invoke this Tcl procedure from the .bas file, with a
    *tcl(your_procedure) command, then the value returned by the procedure is
    directly printed in the output file.
    This is an example of the procedure you need to write in your
    problemtype.tcl file
    proc Example_GetNodesOfElementType { element_type } {
    set nodes
    • __ foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
      -array] 0] 2] {
      lappend nodes {*}$item
      }
      set nodes [lsort -integer -unique $nodes]
      return $nodes
      }
      GiD_Info Mesh is a special GiD-Tcl command (you can see the its syntax at
      GiD Help (GiD Customization - Tcl/Tk extension)
      the rest is Tcl standard scripting language (can see documentation on
      Internet, and also in the help of Ramdebugger that is our Tcl/Tk editor
      and
      debugger), could open RamDebugger from the menu
      Data-Problemtype-Debugger…
      and in the .bas file you must write something like this:
      Hexahedra nodes:
      *tcl(Example_GetNodesOfElementType Hexahedra)
      Quadrilateral nodes:
      *tcl(Example_GetNodesOfElementType Quadrilateral)
      Note that I prefixed the Tcl procedure with ‘Example’, to avoid conflicts
      with other possible Tcl procedure that could use the same name
      GetNodesOfElementType
      I recommend you to use a prefix or namespace related with the name of
      your
      problemtype.

Note: you can obtain multiple .dat output files, writting multiple .bas
templates. a increasing number if added to the name of each .dat file
(and
templates are evaluated sorted alphabetically by its name)
Regards
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, February 14, 2012 12:45 AM
Subject: Re: [GiDlist] Set Materials
Thank You very much,
I have another qustion. I have two types of elements, hexahedron and
rectangular. Can I set element type for each one and loop the nodes of
each one? I want to have all the nodes of hexahedron elements only in
one file and all the nodes of the rectangular elements only in another
file.
Best Regards,
Arash
On Wed, Feb 1, 2012 at 4:37 AM, Enrique Escolano escolano at cimne.upc.edu
wrote:
You can do two loops, and inside take in account only the kind of
material
you want
And you can have in the material a hidden field, named for example
‘class’,
to identify its category
MATERIAL:xxx
Question:class
Value:soil
State:hidden

END MATERIAL
*loop materials
*if(strcmp(Matprop(class),“soil”)==0)
write its properties
*endif
*end materials
*loop materials
*if(strcmp(Matprop(class),“concrete”)==0)
write its properties
*endif
*end materials
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, January 31, 2012 10:05 PM
Subject: [GiDlist] Set Materials

Hello,
I have two kinds of materials in my code: soil materials and concrete
materials. Is there a way to ask GiD to loop only soil materials at
one stage and loop concrete materials at another time in the .bas file
instead of having the command Loop materials which will cover all
soils and concretes? Can I use the set command to select only the soil
/ concrete materials?
Thank You,
Arash


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_


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_


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_

The problem is that your GiD version 9.0.2 is old, and the command GiD_Info
Mesh of this versions don’t support the syntax -array I’ve used.
Download the last GiD developer version 10.2.1.d from our web
http://www.gidhome.com/download/developer-versions


----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 27, 2012 11:12 PM
Subject: Re: [GiDlist] Set Materials


Hello,
I use the exact same problem type that you emailed me, but still, I
get the error:
Error in base file C:/Program Files/GiD/GiD 9.0.2/problemtypes/FLODEF
V11.gid/FLODEF V11-z.bas at line number 2: Error in TCL expression:
'info Mesh Elements Elemtype ?first? ?last? ?-sublist? with
first,last0’
Do you know what the reason might be for this error?
Thank You,
Arash
On Tue, Feb 21, 2012 at 5:06 AM, Enrique Escolano
escolano at cimne.upc.edu wrote:
I attach a simple problemtype that works well

----- Original Message ----- From: “Farzam-Student,STW, Arash”
farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 20, 2012 7:58 PM
Subject: Re: [GiDlist] Set Materials

Yes, actually I have named it the same. I just wrote problem type in
the email for avoiding confusion. But still, I get the same error.
Thanks,
Arash
On Mon, Feb 20, 2012 at 12:35 PM, Enrique Escolano
escolano at cimne.upc.edu wrote:
In order to be automatically sourced by GiD, the name of the tcl file
must
be "FLODEF V11.tcl "
(the same as the problemtype and .tcl extension)
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 20, 2012 7:08 PM
Subject: Re: [GiDlist] Set Materials

Hello,
I made a .tcl file in my problem type containing:
proc Example_GetNodesOfElementType { element_type } {
set nodes

  • __ foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
    -array] 0] 2] {
    lappend nodes {*}$item
    }
    set nodes [lsort -integer -unique $nodes]
    return $nodes
    }
    and in my .bas file,
    I have written
    *tcl(Example_GetNodesOfElementType Hexahedra)
    *NodesNum *NodesCoord
    to get the nodal coordinates all hexahedra elements. It is not working
    and it gives the error:
    Error in base file C:/Program Files/GiD/GiD 9.0.2/problemtypes/FLODEF
    V11.gid/FLODEF V11-post.bas at line number 3: Error in TCL expression:
    ‘invalid command name “Example_GetNodesOfElement_Type”’
    I would be happy to have your comment.
    Thank You,
    Arash Farzam
    On Tue, Feb 14, 2012 at 4:22 AM, Enrique Escolano
    escolano at cimne.upc.edu wrote:
    No, you can’t do a loop on the nodes of a type of elements with simple
    .bas
    commands.
    you can do the loop on the elements of a type, and inside write all its
    nodes, but then you will obtain the list of nodes of this kind of
    element,
    but with repetitions.
    to do this kind of special thinks you must go to Tcl scripting level.
    You
    can define a tcl procedure (inside a problemtype.tcl file it is
    automatically sourced) that
    return what you want (the list of nodes of a type of element
    unrepeated)
    You can invoke this Tcl procedure from the .bas file, with a
    *tcl(your_procedure) command, then the value returned by the procedure
    is
    directly printed in the output file.
    This is an example of the procedure you need to write in your
    problemtype.tcl file
    proc Example_GetNodesOfElementType { element_type } {
    set nodes
    • __ foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
      -array] 0] 2] {
      lappend nodes {*}$item
      }
      set nodes [lsort -integer -unique $nodes]
      return $nodes
      }
      GiD_Info Mesh is a special GiD-Tcl command (you can see the its syntax
      at
      GiD Help (GiD Customization - Tcl/Tk extension)
      the rest is Tcl standard scripting language (can see documentation on
      Internet, and also in the help of Ramdebugger that is our Tcl/Tk editor
      and
      debugger), could open RamDebugger from the menu
      Data-Problemtype-Debugger…
      and in the .bas file you must write something like this:
      Hexahedra nodes:
      *tcl(Example_GetNodesOfElementType Hexahedra)
      Quadrilateral nodes:
      *tcl(Example_GetNodesOfElementType Quadrilateral)
      Note that I prefixed the Tcl procedure with ‘Example’, to avoid
      conflicts
      with other possible Tcl procedure that could use the same name
      GetNodesOfElementType
      I recommend you to use a prefix or namespace related with the name of
      your
      problemtype.

Note: you can obtain multiple .dat output files, writting multiple .bas
templates. a increasing number if added to the name of each .dat file
(and
templates are evaluated sorted alphabetically by its name)
Regards
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, February 14, 2012 12:45 AM
Subject: Re: [GiDlist] Set Materials
Thank You very much,
I have another qustion. I have two types of elements, hexahedron and
rectangular. Can I set element type for each one and loop the nodes of
each one? I want to have all the nodes of hexahedron elements only in
one file and all the nodes of the rectangular elements only in another
file.
Best Regards,
Arash
On Wed, Feb 1, 2012 at 4:37 AM, Enrique Escolano
escolano at cimne.upc.edu
wrote:
You can do two loops, and inside take in account only the kind of
material
you want
And you can have in the material a hidden field, named for example
‘class’,
to identify its category
MATERIAL:xxx
Question:class
Value:soil
State:hidden

END MATERIAL
*loop materials
*if(strcmp(Matprop(class),“soil”)==0)
write its properties
*endif
*end materials
*loop materials
*if(strcmp(Matprop(class),“concrete”)==0)
write its properties
*endif
*end materials
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, January 31, 2012 10:05 PM
Subject: [GiDlist] Set Materials

Hello,
I have two kinds of materials in my code: soil materials and concrete
materials. Is there a way to ask GiD to loop only soil materials at
one stage and loop concrete materials at another time in the .bas
file
instead of having the command Loop materials which will cover all
soils and concretes? Can I use the set command to select only the
soil
/ concrete materials?
Thank You,
Arash


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_


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_


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_

Will I be able to use the version 10.2.1.d with my same software key?


On Tue, Feb 28, 2012 at 3:47 AM, Enrique Escolano
escolano at cimne.upc.edu wrote:
The problem is that your GiD version 9.0.2 is old, and the command GiD_Info
Mesh of this versions don’t support the syntax -array I’ve used.
Download the last GiD developer version 10.2.1.d from our web
_http://www.gidhome.com/download/developer-versions_

----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 27, 2012 11:12 PM
Subject: Re: [GiDlist] Set Materials

Hello,
I use the exact same problem type that you emailed me, but still, I
get the error:
Error in base file C:/Program Files/GiD/GiD 9.0.2/problemtypes/FLODEF
V11.gid/FLODEF V11-z.bas at line number 2: Error in TCL expression:
'info Mesh Elements Elemtype ?first? ?last? ?-sublist? with
first,last0’
Do you know what the reason might be for this error?
Thank You,
Arash
On Tue, Feb 21, 2012 at 5:06 AM, Enrique Escolano
escolano at cimne.upc.edu wrote:
I attach a simple problemtype that works well

----- Original Message ----- From: “Farzam-Student,STW, Arash”
farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 20, 2012 7:58 PM
Subject: Re: [GiDlist] Set Materials

Yes, actually I have named it the same. I just wrote problem type in
the email for avoiding confusion. But still, I get the same error.
Thanks,
Arash
On Mon, Feb 20, 2012 at 12:35 PM, Enrique Escolano
escolano at cimne.upc.edu wrote:
In order to be automatically sourced by GiD, the name of the tcl file
must
be "FLODEF V11.tcl "
(the same as the problemtype and .tcl extension)
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 20, 2012 7:08 PM
Subject: Re: [GiDlist] Set Materials

Hello,
I made a .tcl file in my problem type containing:
proc Example_GetNodesOfElementType { element_type } {
set nodes

  • __ foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
    -array] 0] 2] {
    lappend nodes {*}$item
    }
    set nodes [lsort -integer -unique $nodes]
    return $nodes
    }
    and in my .bas file,
    I have written
    *tcl(Example_GetNodesOfElementType Hexahedra)
    *NodesNum *NodesCoord
    to get the nodal coordinates all hexahedra elements. It is not working
    and it gives the error:
    Error in base file C:/Program Files/GiD/GiD 9.0.2/problemtypes/FLODEF
    V11.gid/FLODEF V11-post.bas at line number 3: Error in TCL expression:
    ‘invalid command name “Example_GetNodesOfElement_Type”’
    I would be happy to have your comment.
    Thank You,
    Arash Farzam
    On Tue, Feb 14, 2012 at 4:22 AM, Enrique Escolano
    escolano at cimne.upc.edu wrote:
    No, you can’t do a loop on the nodes of a type of elements with simple
    .bas
    commands.
    you can do the loop on the elements of a type, and inside write all its
    nodes, but then you will obtain the list of nodes of this kind of
    element,
    but with repetitions.
    to do this kind of special thinks you must go to Tcl scripting level.
    You
    can define a tcl procedure (inside a problemtype.tcl file it is
    automatically sourced) that
    return what you want (the list of nodes of a type of element
    unrepeated)
    You can invoke this Tcl procedure from the .bas file, with a
    *tcl(your_procedure) command, then the value returned by the procedure
    is
    directly printed in the output file.
    This is an example of the procedure you need to write in your
    problemtype.tcl file
    proc Example_GetNodesOfElementType { element_type } {
    set nodes
    • __ foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
      -array] 0] 2] {
      lappend nodes {*}$item
      }
      set nodes [lsort -integer -unique $nodes]
      return $nodes
      }
      GiD_Info Mesh is a special GiD-Tcl command (you can see the its syntax
      at
      GiD Help (GiD Customization - Tcl/Tk extension)
      the rest is Tcl standard scripting language (can see documentation on
      Internet, and also in the help of Ramdebugger that is our Tcl/Tk editor
      and
      debugger), could open RamDebugger from the menu
      Data-Problemtype-Debugger…
      and in the .bas file you must write something like this:
      Hexahedra nodes:
      *tcl(Example_GetNodesOfElementType Hexahedra)
      Quadrilateral nodes:
      *tcl(Example_GetNodesOfElementType Quadrilateral)
      Note that I prefixed the Tcl procedure with ‘Example’, to avoid
      conflicts
      with other possible Tcl procedure that could use the same name
      GetNodesOfElementType
      I recommend you to use a prefix or namespace related with the name of
      your
      problemtype.

Note: you can obtain multiple .dat output files, writting multiple .bas
templates. a increasing number if added to the name of each .dat file
(and
templates are evaluated sorted alphabetically by its name)
Regards
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, February 14, 2012 12:45 AM
Subject: Re: [GiDlist] Set Materials
Thank You very much,
I have another qustion. I have two types of elements, hexahedron and
rectangular. Can I set element type for each one and loop the nodes of
each one? I want to have all the nodes of hexahedron elements only in
one file and all the nodes of the rectangular elements only in another
file.
Best Regards,
Arash
On Wed, Feb 1, 2012 at 4:37 AM, Enrique Escolano
escolano at cimne.upc.edu
wrote:
You can do two loops, and inside take in account only the kind of
material
you want
And you can have in the material a hidden field, named for example
‘class’,
to identify its category
MATERIAL:xxx
Question:class
Value:soil
State:hidden

END MATERIAL
*loop materials
*if(strcmp(Matprop(class),“soil”)==0)
write its properties
*endif
*end materials
*loop materials
*if(strcmp(Matprop(class),“concrete”)==0)
write its properties
*endif
*end materials
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, January 31, 2012 10:05 PM
Subject: [GiDlist] Set Materials

Hello,
I have two kinds of materials in my code: soil materials and concrete
materials. Is there a way to ask GiD to loop only soil materials at
one stage and loop concrete materials at another time in the .bas
file
instead of having the command Loop materials which will cover all
soils and concretes? Can I use the set command to select only the
soil
/ concrete materials?
Thank You,
Arash


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_


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_


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_


GiDlist mailing list
GiDlist at listas.cimne.upc.edu
_http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/gidlist_

The password for version 10 is valid for all the 10.x.x versions, but the
password change between main versions (from 9 to 10, for example).

Regards,

ABEL

\


Abel Coll Sans - Civil Engineer
CIMNE - International Center for Numerical Methods in Engineering
Ofice c-2, C1 building - Campus Nord UPC
Gran Capità s/n, 08034 Barcelona
T: 34 - 93 401 74 03 Fax: 34 - 93 40 65 17



-----Mensaje original-----
De: gidlist-bounces at listas.cimne.upc.edu
[mailto:gidlist-bounces at listas.cimne.upc.edu] En nombre de
Farzam-Student,STW, Arash
Enviado el: miércoles, 29 de febrero de 2012 21:55
Para: gidlist at listas.cimne.upc.edu
Asunto: Re: [GiDlist] Set Materials

Will I be able to use the version 10.2.1.d with my same software key?


On Tue, Feb 28, 2012 at 3:47 AM, Enrique Escolano escolano at cimne.upc.edu
wrote:
The problem is that your GiD version 9.0.2 is old, and the command
GiD_Info Mesh of this versions don’t support the syntax -array I’ve used.
Download the last GiD developer version 10.2.1.d from our web
_http://www.gidhome.com/download/developer-versions_

----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 27, 2012 11:12 PM
Subject: Re: [GiDlist] Set Materials

Hello,
I use the exact same problem type that you emailed me, but still, I
get the error:
Error in base file C:/Program Files/GiD/GiD 9.0.2/problemtypes/FLODEF
V11.gid/FLODEF V11-z.bas at line number 2: Error in TCL expression:
'info Mesh Elements Elemtype ?first? ?last? ?-sublist? with
first,last0’
Do you know what the reason might be for this error?
Thank You,
Arash
On Tue, Feb 21, 2012 at 5:06 AM, Enrique Escolano
escolano at cimne.upc.edu wrote:
I attach a simple problemtype that works well

----- Original Message ----- From: “Farzam-Student,STW, Arash”
farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 20, 2012 7:58 PM
Subject: Re: [GiDlist] Set Materials

Yes, actually I have named it the same. I just wrote problem type in
the email for avoiding confusion. But still, I get the same error.
Thanks,
Arash
On Mon, Feb 20, 2012 at 12:35 PM, Enrique Escolano
escolano at cimne.upc.edu wrote:
In order to be automatically sourced by GiD, the name of the tcl
file must be "FLODEF V11.tcl "
(the same as the problemtype and .tcl extension)
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 20, 2012 7:08 PM
Subject: Re: [GiDlist] Set Materials

Hello,
I made a .tcl file in my problem type containing:
proc Example_GetNodesOfElementType { element_type } { set nodes
__

  • foreach item [lindex [lindex [GiD_Info Mesh Elements
    $element_type -array] 0] 2] { lappend nodes {*}$item } set nodes
    [lsort -integer -unique $nodes] return $nodes }
    and in my .bas file,
    I have written
    *tcl(Example_GetNodesOfElementType Hexahedra) *NodesNum *NodesCoord
    to get the nodal coordinates all hexahedra elements. It is not
    working and it gives the error:
    Error in base file C:/Program Files/GiD/GiD
    9.0.2/problemtypes/FLODEF V11.gid/FLODEF V11-post.bas at line number 3:
    Error in TCL expression:
    ‘invalid command name “Example_GetNodesOfElement_Type”’
    I would be happy to have your comment.
    Thank You,
    Arash Farzam
    On Tue, Feb 14, 2012 at 4:22 AM, Enrique Escolano
    escolano at cimne.upc.edu wrote:
    No, you can’t do a loop on the nodes of a type of elements with
    simple .bas commands.
    you can do the loop on the elements of a type, and inside write
    all its nodes, but then you will obtain the list of nodes of this
    kind of element, but with repetitions.
    to do this kind of special thinks you must go to Tcl scripting level.
    You
    can define a tcl procedure (inside a problemtype.tcl file it is
    automatically sourced) that return what you want (the list of
    nodes of a type of element
    unrepeated)
    You can invoke this Tcl procedure from the .bas file, with a
    *tcl(your_procedure) command, then the value returned by the
    procedure is directly printed in the output file.
    This is an example of the procedure you need to write in your
    problemtype.tcl file
    proc Example_GetNodesOfElementType { element_type } { set nodes
    __
    • foreach item [lindex [lindex [GiD_Info Mesh Elements
      $element_type -array] 0] 2] { lappend nodes {*}$item } set nodes
      [lsort -integer -unique $nodes] return $nodes }
      GiD_Info Mesh is a special GiD-Tcl command (you can see the its
      syntax at GiD Help (GiD Customization - Tcl/Tk extension) the rest
      is Tcl standard scripting language (can see documentation on
      Internet, and also in the help of Ramdebugger that is our Tcl/Tk
      editor and debugger), could open RamDebugger from the menu
      Data-Problemtype-Debugger…
      and in the .bas file you must write something like this:
      Hexahedra nodes:
      *tcl(Example_GetNodesOfElementType Hexahedra) Quadrilateral nodes:
      *tcl(Example_GetNodesOfElementType Quadrilateral)
      Note that I prefixed the Tcl procedure with ‘Example’, to avoid
      conflicts with other possible Tcl procedure that could use the
      same name GetNodesOfElementType I recommend you to use a prefix or
      namespace related with the name of your problemtype.

Note: you can obtain multiple .dat output files, writting multiple
.bas templates. a increasing number if added to the name of each
.dat file (and templates are evaluated sorted alphabetically by
its name)
Regards
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, February 14, 2012 12:45 AM
Subject: Re: [GiDlist] Set Materials
Thank You very much,
I have another qustion. I have two types of elements, hexahedron
and rectangular. Can I set element type for each one and loop the
nodes of each one? I want to have all the nodes of hexahedron
elements only in one file and all the nodes of the rectangular
elements only in another file.
Best Regards,
Arash
On Wed, Feb 1, 2012 at 4:37 AM, Enrique Escolano
escolano at cimne.upc.edu
wrote:
You can do two loops, and inside take in account only the kind of
material you want And you can have in the material a hidden
field, named for example ‘class’, to identify its category
MATERIAL:xxx Question:class Value:soil State:hidden …
END MATERIAL
*loop materials
*if(strcmp(Matprop(class),“soil”)==0)
write its properties
*endif
*end materials
*loop materials
*if(strcmp(Matprop(class),“concrete”)==0)
write its properties
*endif
*end materials
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, January 31, 2012 10:05 PM
Subject: [GiDlist] Set Materials

Hello,
I have two kinds of materials in my code: soil materials and
concrete materials. Is there a way to ask GiD to loop only soil
materials at one stage and loop concrete materials at another
time in the .bas file instead of having the command Loop
materials which will cover all soils and concretes? Can I use
the set command to select only the soil / concrete materials?
Thank You,
Arash


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_


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_


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_


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

No, the password of versions 10.x is different of the passwords of version 9.x. Could try GiD 10.x with a trial one month password

You can restrict the use of GiD-Tcl commands to the ones available on GiD 9.0.2 (see Help-Customization-TclTk extension)

in this version you can’t use the -array flag of the command
GiD_Info Mesh Elements $element_type -array
but for example could use
GiD_Info Mesh Elements $element_type -sublist

this is the procedure modified to work also with your version:

proc Example_GetNodesOfElementType { element_type } {
set nodes

  • foreach item [GiD_Info Mesh Elements $element_type -sublist] {
    lappend nodes {*}[lrange $item 1 end-1]
    }
    set nodes [lsort -integer -unique $nodes]
    return $nodes
    }

----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Wednesday, February 29, 2012 9:55 PM
Subject: Re: [GiDlist] Set Materials


Will I be able to use the version 10.2.1.d with my same software key?

On Tue, Feb 28, 2012 at 3:47 AM, Enrique Escolano
escolano at cimne.upc.edu wrote:
The problem is that your GiD version 9.0.2 is old, and the command GiD_Info
Mesh of this versions don’t support the syntax -array I’ve used.
Download the last GiD developer version 10.2.1.d from our web
_http://www.gidhome.com/download/developer-versions_

----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 27, 2012 11:12 PM
Subject: Re: [GiDlist] Set Materials

Hello,
I use the exact same problem type that you emailed me, but still, I
get the error:
Error in base file C:/Program Files/GiD/GiD 9.0.2/problemtypes/FLODEF
V11.gid/FLODEF V11-z.bas at line number 2: Error in TCL expression:
'info Mesh Elements Elemtype ?first? ?last? ?-sublist? with
first,last0’
Do you know what the reason might be for this error?
Thank You,
Arash
On Tue, Feb 21, 2012 at 5:06 AM, Enrique Escolano
escolano at cimne.upc.edu wrote:
I attach a simple problemtype that works well

----- Original Message ----- From: “Farzam-Student,STW, Arash”
farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 20, 2012 7:58 PM
Subject: Re: [GiDlist] Set Materials

Yes, actually I have named it the same. I just wrote problem type in
the email for avoiding confusion. But still, I get the same error.
Thanks,
Arash
On Mon, Feb 20, 2012 at 12:35 PM, Enrique Escolano
escolano at cimne.upc.edu wrote:
In order to be automatically sourced by GiD, the name of the tcl file
must
be "FLODEF V11.tcl "
(the same as the problemtype and .tcl extension)
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 20, 2012 7:08 PM
Subject: Re: [GiDlist] Set Materials

Hello,
I made a .tcl file in my problem type containing:
proc Example_GetNodesOfElementType { element_type } {
set nodes

  • __ foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
    -array] 0] 2] {
    lappend nodes {*}$item
    }
    set nodes [lsort -integer -unique $nodes]
    return $nodes
    }
    and in my .bas file,
    I have written
    *tcl(Example_GetNodesOfElementType Hexahedra)
    *NodesNum *NodesCoord
    to get the nodal coordinates all hexahedra elements. It is not working
    and it gives the error:
    Error in base file C:/Program Files/GiD/GiD 9.0.2/problemtypes/FLODEF
    V11.gid/FLODEF V11-post.bas at line number 3: Error in TCL expression:
    ‘invalid command name “Example_GetNodesOfElement_Type”’
    I would be happy to have your comment.
    Thank You,
    Arash Farzam
    On Tue, Feb 14, 2012 at 4:22 AM, Enrique Escolano
    escolano at cimne.upc.edu wrote:
    No, you can’t do a loop on the nodes of a type of elements with simple
    .bas
    commands.
    you can do the loop on the elements of a type, and inside write all its
    nodes, but then you will obtain the list of nodes of this kind of
    element,
    but with repetitions.
    to do this kind of special thinks you must go to Tcl scripting level.
    You
    can define a tcl procedure (inside a problemtype.tcl file it is
    automatically sourced) that
    return what you want (the list of nodes of a type of element
    unrepeated)
    You can invoke this Tcl procedure from the .bas file, with a
    *tcl(your_procedure) command, then the value returned by the procedure
    is
    directly printed in the output file.
    This is an example of the procedure you need to write in your
    problemtype.tcl file
    proc Example_GetNodesOfElementType { element_type } {
    set nodes
    • __ foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
      -array] 0] 2] {
      lappend nodes {*}$item
      }
      set nodes [lsort -integer -unique $nodes]
      return $nodes
      }
      GiD_Info Mesh is a special GiD-Tcl command (you can see the its syntax
      at
      GiD Help (GiD Customization - Tcl/Tk extension)
      the rest is Tcl standard scripting language (can see documentation on
      Internet, and also in the help of Ramdebugger that is our Tcl/Tk editor
      and
      debugger), could open RamDebugger from the menu
      Data-Problemtype-Debugger…
      and in the .bas file you must write something like this:
      Hexahedra nodes:
      *tcl(Example_GetNodesOfElementType Hexahedra)
      Quadrilateral nodes:
      *tcl(Example_GetNodesOfElementType Quadrilateral)
      Note that I prefixed the Tcl procedure with ‘Example’, to avoid
      conflicts
      with other possible Tcl procedure that could use the same name
      GetNodesOfElementType
      I recommend you to use a prefix or namespace related with the name of
      your
      problemtype.

Note: you can obtain multiple .dat output files, writting multiple .bas
templates. a increasing number if added to the name of each .dat file
(and
templates are evaluated sorted alphabetically by its name)
Regards
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, February 14, 2012 12:45 AM
Subject: Re: [GiDlist] Set Materials
Thank You very much,
I have another qustion. I have two types of elements, hexahedron and
rectangular. Can I set element type for each one and loop the nodes of
each one? I want to have all the nodes of hexahedron elements only in
one file and all the nodes of the rectangular elements only in another
file.
Best Regards,
Arash
On Wed, Feb 1, 2012 at 4:37 AM, Enrique Escolano
escolano at cimne.upc.edu
wrote:
You can do two loops, and inside take in account only the kind of
material
you want
And you can have in the material a hidden field, named for example
‘class’,
to identify its category
MATERIAL:xxx
Question:class
Value:soil
State:hidden

END MATERIAL
*loop materials
*if(strcmp(Matprop(class),“soil”)==0)
write its properties
*endif
*end materials
*loop materials
*if(strcmp(Matprop(class),“concrete”)==0)
write its properties
*endif
*end materials
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, January 31, 2012 10:05 PM
Subject: [GiDlist] Set Materials

Hello,
I have two kinds of materials in my code: soil materials and concrete
materials. Is there a way to ask GiD to loop only soil materials at
one stage and loop concrete materials at another time in the .bas
file
instead of having the command Loop materials which will cover all
soils and concretes? Can I use the set command to select only the
soil
/ concrete materials?
Thank You,
Arash


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_


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_


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_


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/20120301/ebc81597/attachment-0001.htm

Thank You for the update,

Is this new code (with the sublist being used instead of array) still
supposed to write the nodes? I tried it and it gave me just one single
number instead of the list of the nodes.

Thank You

On Thu, Mar 1, 2012 at 4:02 AM, Enrique Escolano escolano at cimne.upc.edu wrote:
Password Alert! This message may contain a request for your password. NEVER
SEND OR RESPOND TO E-MAIL REQUESTS FOR YOUR PASSWORD. For questions about
this alert, please contact the IT HelpDesk at 405-744-4357 or email
helpdesk at okstate.edu.


No, the password of versions 10.x is different of the passwords of version
9.x. Could try GiD 10.x with a trial one month password
You can restrict the use of GiD-Tcl commands to the ones available on GiD
9.0.2 (see Help-Customization-TclTk extension)
in this version you can’t use the -array flag of the command
GiD_Info Mesh Elements $element_type -array
but for example could use
GiD_Info Mesh Elements $element_type -sublist
this is the procedure modified to work also with your version:
proc Example_GetNodesOfElementType { element_type } {
set nodes

  • __ foreach item [GiD_Info Mesh Elements $element_type -sublist] {
    lappend nodes {*}[lrange $item 1 end-1]
    }
    set nodes [lsort -integer -unique $nodes]
    return $nodes
    }
    ----- Original Message -----
    From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
    To: gidlist at listas.cimne.upc.edu
    Sent: Wednesday, February 29, 2012 9:55 PM
    Subject: Re: [GiDlist] Set Materials
    Will I be able to use the version 10.2.1.d with my same software key?

On Tue, Feb 28, 2012 at 3:47 AM, Enrique Escolano
escolano at cimne.upc.edu wrote:
The problem is that your GiD version 9.0.2 is old, and the command
GiD_Info
Mesh of this versions don’t support the syntax -array I’ve used.
Download the last GiD developer version 10.2.1.d from our web
_http://www.gidhome.com/download/developer-versions_

----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 27, 2012 11:12 PM
Subject: Re: [GiDlist] Set Materials

Hello,
I use the exact same problem type that you emailed me, but still, I
get the error:
Error in base file C:/Program Files/GiD/GiD 9.0.2/problemtypes/FLODEF
V11.gid/FLODEF V11-z.bas at line number 2: Error in TCL expression:
'info Mesh Elements Elemtype ?first? ?last? ?-sublist? with
first,last0’
Do you know what the reason might be for this error?
Thank You,
Arash
On Tue, Feb 21, 2012 at 5:06 AM, Enrique Escolano
escolano at cimne.upc.edu wrote:
I attach a simple problemtype that works well

----- Original Message ----- From: “Farzam-Student,STW, Arash”
farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 20, 2012 7:58 PM
Subject: Re: [GiDlist] Set Materials

Yes, actually I have named it the same. I just wrote problem type in
the email for avoiding confusion. But still, I get the same error.
Thanks,
Arash
On Mon, Feb 20, 2012 at 12:35 PM, Enrique Escolano
escolano at cimne.upc.edu wrote:
In order to be automatically sourced by GiD, the name of the tcl file
must
be "FLODEF V11.tcl "
(the same as the problemtype and .tcl extension)
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Monday, February 20, 2012 7:08 PM
Subject: Re: [GiDlist] Set Materials

Hello,
I made a .tcl file in my problem type containing:
proc Example_GetNodesOfElementType { element_type } {
set nodes

  • __ foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
    -array] 0] 2] {
    lappend nodes {*}$item
    }
    set nodes [lsort -integer -unique $nodes]
    return $nodes
    }
    and in my .bas file,
    I have written
    *tcl(Example_GetNodesOfElementType Hexahedra)
    *NodesNum *NodesCoord
    to get the nodal coordinates all hexahedra elements. It is not working
    and it gives the error:
    Error in base file C:/Program Files/GiD/GiD 9.0.2/problemtypes/FLODEF
    V11.gid/FLODEF V11-post.bas at line number 3: Error in TCL expression:
    ‘invalid command name “Example_GetNodesOfElement_Type”’
    I would be happy to have your comment.
    Thank You,
    Arash Farzam
    On Tue, Feb 14, 2012 at 4:22 AM, Enrique Escolano
    escolano at cimne.upc.edu wrote:
    No, you can’t do a loop on the nodes of a type of elements with
    simple
    .bas
    commands.
    you can do the loop on the elements of a type, and inside write all
    its
    nodes, but then you will obtain the list of nodes of this kind of
    element,
    but with repetitions.
    to do this kind of special thinks you must go to Tcl scripting level.
    You
    can define a tcl procedure (inside a problemtype.tcl file it is
    automatically sourced) that
    return what you want (the list of nodes of a type of element
    unrepeated)
    You can invoke this Tcl procedure from the .bas file, with a
    *tcl(your_procedure) command, then the value returned by the
    procedure
    is
    directly printed in the output file.
    This is an example of the procedure you need to write in your
    problemtype.tcl file
    proc Example_GetNodesOfElementType { element_type } {
    set nodes
    • __ foreach item [lindex [lindex [GiD_Info Mesh Elements $element_type
      -array] 0] 2] {
      lappend nodes {*}$item
      }
      set nodes [lsort -integer -unique $nodes]
      return $nodes
      }
      GiD_Info Mesh is a special GiD-Tcl command (you can see the its
      syntax
      at
      GiD Help (GiD Customization - Tcl/Tk extension)
      the rest is Tcl standard scripting language (can see documentation on
      Internet, and also in the help of Ramdebugger that is our Tcl/Tk
      editor
      and
      debugger), could open RamDebugger from the menu
      Data-Problemtype-Debugger…
      and in the .bas file you must write something like this:
      Hexahedra nodes:
      *tcl(Example_GetNodesOfElementType Hexahedra)
      Quadrilateral nodes:
      *tcl(Example_GetNodesOfElementType Quadrilateral)
      Note that I prefixed the Tcl procedure with ‘Example’, to avoid
      conflicts
      with other possible Tcl procedure that could use the same name
      GetNodesOfElementType
      I recommend you to use a prefix or namespace related with the name of
      your
      problemtype.

Note: you can obtain multiple .dat output files, writting multiple
.bas
templates. a increasing number if added to the name of each .dat file
(and
templates are evaluated sorted alphabetically by its name)
Regards
Enrique
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, February 14, 2012 12:45 AM
Subject: Re: [GiDlist] Set Materials
Thank You very much,
I have another qustion. I have two types of elements, hexahedron and
rectangular. Can I set element type for each one and loop the nodes
of
each one? I want to have all the nodes of hexahedron elements only in
one file and all the nodes of the rectangular elements only in
another
file.
Best Regards,
Arash
On Wed, Feb 1, 2012 at 4:37 AM, Enrique Escolano
escolano at cimne.upc.edu
wrote:
You can do two loops, and inside take in account only the kind of
material
you want
And you can have in the material a hidden field, named for example
‘class’,
to identify its category
MATERIAL:xxx
Question:class
Value:soil
State:hidden

END MATERIAL
*loop materials
*if(strcmp(Matprop(class),“soil”)==0)
write its properties
*endif
*end materials
*loop materials
*if(strcmp(Matprop(class),“concrete”)==0)
write its properties
*endif
*end materials
----- Original Message -----
From: “Farzam-Student,STW, Arash” farzam at ostatemail.okstate.edu
To: gidlist at listas.cimne.upc.edu
Sent: Tuesday, January 31, 2012 10:05 PM
Subject: [GiDlist] Set Materials

Hello,
I have two kinds of materials in my code: soil materials and
concrete
materials. Is there a way to ask GiD to loop only soil materials at
one stage and loop concrete materials at another time in the .bas
file
instead of having the command Loop materials which will cover all
soils and concretes? Can I use the set command to select only the
soil
/ concrete materials?
Thank You,
Arash


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_


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_


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_


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_