Hello GiD fans, users and experts wherever you are,
I want to share with you my problem that I have and hope to get any solutions and suggest from you.
I'm devoloping interface between FEAP and GiD 7.2 at my institute for my Master Thesis. I would like GiD to generate uniform load to be distributed along the nodes I have after mesh generation. This load generation result in form of single nodal loads over every node along the line will be used in FEAP as input for LOAD macro editor:
LOAD
node1, X-coor ,Y-coord ,p_x, p_y
node2, X-coor ,Y-coord, p_x, p_y
node3, X-coor ,Y-coord, p_x, p_y
...etc.......
My .cnd file :
NUMBER:5 CONDITION:Face-Load
CONDTYPE:over lines
CONDMESHTYPE:over nodes
QUESTION:L1.....(length of constant uniform load)
VALUE:10 (m)
QUESTION:n_x....(Number of face elements (which are under uniform load) to be generated)
VALUE:4
QUESTION:q_x...(Uniform Load x direction)
VALUE:0.0
QUESTION:q_y...(Uniform Load y direction)
VALUE:-10 (kN/m)
QUESTION:p_x..(Nodal load x direction)
VALUE:0.0
QUESTION:p_y#FUNC#(Cond(4,real)*Cond(1,real)/Cond(2,int)*0.5).....(nodal load y direction)
VALUE:Autocalculate
STATE:hidden
and my .bas file :
*Set Cond Face-Load *nodes *Canrepeat
*If(CondNumEntities(Int)0)
LOAD
*loop nodes *onlyInCond
*Nodesnum *NodesCoord(1,real) *NodesCoord(2,real) *cond(p_x,real) *cond(p_y,real)
*End loop nodes
*endif
The result I have in my .dat file is like that:
(for L1=10(m), n_x=4 and q_y = -10(kN/m))
LOAD
Node X-coor Y-Coord p_x p_y
1, 0.00, 0.0, 0.0, -12.5
2, 2.50, 0.0, 0.0, -12.5
3, 5.00, 0.0, 0.0, -12.5
4, 7.50, 0.0, 0.0, -12.5
5, 0.00, 0.0, 0.0, -12.5
I did not see any possibility to tell GiD that at node 2, 3 and 4, since they get two times the half of the load from left element and right element, they should be each -25 , instead of -12.5.
If I would use in my .cnd file CANREPEAT: yes after CONDMESHTYPE: nodes,
I would get the same list of LOAD as above once more time , and it's still not correct.
The correct result should be :
LOAD
Node X-coor Y-Coord p_x p_y
1, 0.00, 0.0, 0.0, -12.5
2, 2.50, 0.0, 0.0, -25
3, 5.00, 0.0, 0.0, -25
4, 7.50, 0.0, 0.0, -25
5, 10.00, 0.0, 0.0, -12.5
I hope you understand what I meant and I'm looking forward to hearing from you.
Best regards,
Benedictus Benny PO
---------------------------------
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail
Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis.Téléchargez GRATUITEMENT ici !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20041101/6893d9c6/attachment.htm
[GiDlist] Uniform load distribution
Moderator: GiD Team
[GiDlist] Uniform load distribution
You can use Tcl language for enhanced features.
Can call a tcl procedure from the bas file with the *tcl command
This is a sample:
File .cnd Define a condition over lines, over face elements (not over nodes), for example, named Face-Load
NUMBER: 1 CONDITION: Face-Load
CONDTYPE: over lines
CONDMESHTYPE: over face elements
QUESTION: Pressure
VALUE: 0.0
HELP: Pressure on line to be transferred as equivalent nodal loads
END CONDITION
File .bas Call a tcl procedure, named SampleLoadWriteNodalLoads
...
*tcl(SampleLoadWriteNodalLoads)
...
File .tcl Define this tcl procedure.
proc SampleLoadWriteNodalLoads { } {
#set a {{10 1 - 3} {2 1 - 3} {6 3 - 3} {1 1 - 3}}
set infocond [GiD_Info conditions Face-Load mesh]
foreach item $infocond {
set elem [lindex $item 0]
set face [lindex $item 1]
set pressure [lindex $item 3]
set infoelem [GiD_Info mesh elements Triangle $elem]
if { $face == 1 } {
set n1 [lindex $infoelem 1]
set n2 [lindex $infoelem 2]
} elseif { $face == 2 } {
set n1 [lindex $infoelem 2]
set n2 [lindex $infoelem 3]
} else {
#assumed face==3 ,only for triangles
set n1 [lindex $infoelem 3]
set n2 [lindex $infoelem 1]
}
set c1 [lrange [GiD_Info mesh nodes $n1] 1 end]
set c2 [lrange [GiD_Info mesh nodes $n2] 1 end]
set dist [::MathUtils::VectorDistance $c1 $c2]
set force [expr {$dist*$pressure*0.5}]
if { [info exists F($n1)] } {
set F($n1) [expr {$F($n1)+$force} ]
} else {
set F($n1) $force
}
if { [info exists F($n2)] } {
set F($n2) [expr {$F($n2)+$force} ]
} else {
set F($n2) $force
}
}
set result "LOAD\n"
append result "Node F\n"
foreach node [array names F] {
append result "$node $F($node)\n"
}
return $result
}
This procedure requires the last 7.5.0b GiD beta version.
GiD_Info (or .gid.central.s info) is a tcl procedure defined by GiD to return internal information.(read GiD help about Tcl-Tk extension)
The other command are Tcl standard (can see more information about Tcl/Tk language from the Internet)
I attach a zip file with this sample problemtype source.
Regards
Enrique Escolano
----- Original Message -----
From: Benedictus Benny Po
To: gidlist at gatxan.cimne.upc.es
Sent: Monday, November 01, 2004 8:45 PM
Subject: [GiDlist] Uniform load distribution
Hello GiD fans, users and experts wherever you are,
I want to share with you my problem that I have and hope to get any solutions and suggest from you.
I'm devoloping interface between FEAP and GiD 7.2 at my institute for my Master Thesis. I would like GiD to generate uniform load to be distributed along the nodes I have after mesh generation. This load generation result in form of single nodal loads over every node along the line will be used in FEAP as input for LOAD macro editor:
LOAD
node1, X-coor ,Y-coord ,p_x, p_y
node2, X-coor ,Y-coord, p_x, p_y
node3, X-coor ,Y-coord, p_x, p_y
...etc.......
My .cnd file :
NUMBER:5 CONDITION:Face-Load
CONDTYPE:over lines
CONDMESHTYPE:over nodes
QUESTION:L1.....(length of constant uniform load)
VALUE:10 (m)
QUESTION:n_x....(Number of face elements (which are under uniform load) to be generated)
VALUE:4
QUESTION:q_x...(Uniform Load x direction)
VALUE:0.0
QUESTION:q_y...(Uniform Load y direction)
VALUE:-10 (kN/m)
QUESTION:p_x..(Nodal load x direction)
VALUE:0.0
QUESTION:p_y#FUNC#(Cond(4,real)*Cond(1,real)/Cond(2,int)*0.5).....(nodal load y direction)
VALUE:Autocalculate
STATE:hidden
and my .bas file :
*Set Cond Face-Load *nodes *Canrepeat
*If(CondNumEntities(Int)0)
LOAD
*loop nodes *onlyInCond
*Nodesnum *NodesCoord(1,real) *NodesCoord(2,real) *cond(p_x,real) *cond(p_y,real)
*End loop nodes
*endif
The result I have in my .dat file is like that:
(for L1=10(m), n_x=4 and q_y = -10(kN/m))
LOAD
Node X-coor Y-Coord p_x p_y
1, 0.00, 0.0, 0.0, -12.5
2, 2.50, 0.0, 0.0, -12.5
3, 5.00, 0.0, 0.0, -12.5
4, 7.50, 0.0, 0.0, -12.5
5, 0.00, 0.0, 0.0, -12.5
I did not see any possibility to tell GiD that at node 2, 3 and 4, since they get two times the half of the load from left element and right element, they should be each -25 , instead of -12.5.
If I would use in my .cnd file CANREPEAT: yes after CONDMESHTYPE: nodes,
I would get the same list of LOAD as above once more time , and it's still not correct.
The correct result should be :
LOAD
Node X-coor Y-Coord p_x p_y
1, 0.00, 0.0, 0.0, -12.5
2, 2.50, 0.0, 0.0, -25
3, 5.00, 0.0, 0.0, -25
4, 7.50, 0.0, 0.0, -25
5, 10.00, 0.0, 0.0, -12.5
I hope you understand what I meant and I'm looking forward to hearing from you.
Best regards,
Benedictus Benny PO
------------------------------------------------------------------------------
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail
Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. Téléchargez GRATUITEMENT ici !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20041102/5c70d0fa/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SampleLoad.zip
Type: application/x-zip-compressed
Size: 1225 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20041102/5c70d0fa/attachment.bin
Can call a tcl procedure from the bas file with the *tcl command
This is a sample:
File .cnd Define a condition over lines, over face elements (not over nodes), for example, named Face-Load
NUMBER: 1 CONDITION: Face-Load
CONDTYPE: over lines
CONDMESHTYPE: over face elements
QUESTION: Pressure
VALUE: 0.0
HELP: Pressure on line to be transferred as equivalent nodal loads
END CONDITION
File .bas Call a tcl procedure, named SampleLoadWriteNodalLoads
...
*tcl(SampleLoadWriteNodalLoads)
...
File .tcl Define this tcl procedure.
proc SampleLoadWriteNodalLoads { } {
#set a {{10 1 - 3} {2 1 - 3} {6 3 - 3} {1 1 - 3}}
set infocond [GiD_Info conditions Face-Load mesh]
foreach item $infocond {
set elem [lindex $item 0]
set face [lindex $item 1]
set pressure [lindex $item 3]
set infoelem [GiD_Info mesh elements Triangle $elem]
if { $face == 1 } {
set n1 [lindex $infoelem 1]
set n2 [lindex $infoelem 2]
} elseif { $face == 2 } {
set n1 [lindex $infoelem 2]
set n2 [lindex $infoelem 3]
} else {
#assumed face==3 ,only for triangles
set n1 [lindex $infoelem 3]
set n2 [lindex $infoelem 1]
}
set c1 [lrange [GiD_Info mesh nodes $n1] 1 end]
set c2 [lrange [GiD_Info mesh nodes $n2] 1 end]
set dist [::MathUtils::VectorDistance $c1 $c2]
set force [expr {$dist*$pressure*0.5}]
if { [info exists F($n1)] } {
set F($n1) [expr {$F($n1)+$force} ]
} else {
set F($n1) $force
}
if { [info exists F($n2)] } {
set F($n2) [expr {$F($n2)+$force} ]
} else {
set F($n2) $force
}
}
set result "LOAD\n"
append result "Node F\n"
foreach node [array names F] {
append result "$node $F($node)\n"
}
return $result
}
This procedure requires the last 7.5.0b GiD beta version.
GiD_Info (or .gid.central.s info) is a tcl procedure defined by GiD to return internal information.(read GiD help about Tcl-Tk extension)
The other command are Tcl standard (can see more information about Tcl/Tk language from the Internet)
I attach a zip file with this sample problemtype source.
Regards
Enrique Escolano
----- Original Message -----
From: Benedictus Benny Po
To: gidlist at gatxan.cimne.upc.es
Sent: Monday, November 01, 2004 8:45 PM
Subject: [GiDlist] Uniform load distribution
Hello GiD fans, users and experts wherever you are,
I want to share with you my problem that I have and hope to get any solutions and suggest from you.
I'm devoloping interface between FEAP and GiD 7.2 at my institute for my Master Thesis. I would like GiD to generate uniform load to be distributed along the nodes I have after mesh generation. This load generation result in form of single nodal loads over every node along the line will be used in FEAP as input for LOAD macro editor:
LOAD
node1, X-coor ,Y-coord ,p_x, p_y
node2, X-coor ,Y-coord, p_x, p_y
node3, X-coor ,Y-coord, p_x, p_y
...etc.......
My .cnd file :
NUMBER:5 CONDITION:Face-Load
CONDTYPE:over lines
CONDMESHTYPE:over nodes
QUESTION:L1.....(length of constant uniform load)
VALUE:10 (m)
QUESTION:n_x....(Number of face elements (which are under uniform load) to be generated)
VALUE:4
QUESTION:q_x...(Uniform Load x direction)
VALUE:0.0
QUESTION:q_y...(Uniform Load y direction)
VALUE:-10 (kN/m)
QUESTION:p_x..(Nodal load x direction)
VALUE:0.0
QUESTION:p_y#FUNC#(Cond(4,real)*Cond(1,real)/Cond(2,int)*0.5).....(nodal load y direction)
VALUE:Autocalculate
STATE:hidden
and my .bas file :
*Set Cond Face-Load *nodes *Canrepeat
*If(CondNumEntities(Int)0)
LOAD
*loop nodes *onlyInCond
*Nodesnum *NodesCoord(1,real) *NodesCoord(2,real) *cond(p_x,real) *cond(p_y,real)
*End loop nodes
*endif
The result I have in my .dat file is like that:
(for L1=10(m), n_x=4 and q_y = -10(kN/m))
LOAD
Node X-coor Y-Coord p_x p_y
1, 0.00, 0.0, 0.0, -12.5
2, 2.50, 0.0, 0.0, -12.5
3, 5.00, 0.0, 0.0, -12.5
4, 7.50, 0.0, 0.0, -12.5
5, 0.00, 0.0, 0.0, -12.5
I did not see any possibility to tell GiD that at node 2, 3 and 4, since they get two times the half of the load from left element and right element, they should be each -25 , instead of -12.5.
If I would use in my .cnd file CANREPEAT: yes after CONDMESHTYPE: nodes,
I would get the same list of LOAD as above once more time , and it's still not correct.
The correct result should be :
LOAD
Node X-coor Y-Coord p_x p_y
1, 0.00, 0.0, 0.0, -12.5
2, 2.50, 0.0, 0.0, -25
3, 5.00, 0.0, 0.0, -25
4, 7.50, 0.0, 0.0, -25
5, 10.00, 0.0, 0.0, -12.5
I hope you understand what I meant and I'm looking forward to hearing from you.
Best regards,
Benedictus Benny PO
------------------------------------------------------------------------------
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail
Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. Téléchargez GRATUITEMENT ici !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20041102/5c70d0fa/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SampleLoad.zip
Type: application/x-zip-compressed
Size: 1225 bytes
Desc: not available
Url : http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20041102/5c70d0fa/attachment.bin