CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Gambit - Journal programming - Summerize and TUI

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 18, 2006, 10:50
Default Gambit - Journal programming - Summerize and TUI
  #1
Cyril
Guest
 
Posts: n/a
Does any body knows how to find the coordinates of a point in Test User Interface ?

I splited an edge, and I would like to know the Y-coord of the point created, and store it in a variable, in the .jou.

I would like to know th name of the 2nd edge created during the splitting.

If smbd knows anything about it... many thanks !
  Reply With Quote

Old   April 18, 2006, 17:13
Default Re: Gambit - Journal programming - Summerize and T
  #2
freeman
Guest
 
Posts: n/a
I'm not sure if I did get your question. But I use test user inface for all my work. for each run the .jou from Gambit update itself and echos your commands in .jou in the folder GAMBIT.1--- created by Gambit. if you run for so many times using the same .jou, then it'll reapeating itself. so you got to search using the text editor or scroll to the bottom of the page and you should find your last command. I used CW32 as my text editor and I can search through the file for any word or name. I hope this help. drop me lines if you still have a problem.
  Reply With Quote

Old   April 19, 2006, 03:20
Default Re: Gambit - Journal programming - Summerize and T
  #3
Cyril
Guest
 
Posts: n/a
Hi !

Here is the problem : I've got a geometry (diverent for each case). And I want to add an environment to it. The fact is that I don't know how many lines are created in the 1st geometry. So, in the 2nd geometry, I can't create "vertex.1", .2, ... (already exist).

That's why I create "vertex.1000", .2000, etc. (see the text below).

My problem is that I can't manage the name of a vertex created by splitting an edge for instance. And if I can't know its name, I can't use it later. Do U see ?

Here is my journal (run it alone, and then, run it with 2 vertices and an edgecreated before... the problem appears with vertex.5, .6 and .7) :

$D=30

$L=107.3

$MMD=500

$M=2.4

$Angle=asin(1/$M)

$DBdF=6*$D

$Lbm=(1.5*$L+tan($Angle)*$DBdF)*cos($Angle)

$HCu=0.15

$IS=3

vertex create "vertex.1000" coordinates 0 0 0

vertex create "vertex.2000" coordinates 0 (1.5*$L) 0

vertex create "vertex.3000" coordinates $DBdF 0 0

vertex create "vertex.4000" coordinates ($DBdF+$MMD/(tan($Angle))) $MMD 0

vertex cmove "vertex.4000" multiple 1 offset (-$Lbm*sin($Angle)) ($Lbm*cos($Angle)) 0

edge create "edge.1000" straight "vertex.2000" "vertex.1000"

edge create "edge.2000" straight "vertex.1000" "vertex.3000"

edge create "edge.3000" straight "vertex.3000" "vertex.4000"

edge create "edge.4000" straight "vertex.4000" "vertex.5"

edge create "edge.5000" straight "vertex.5" "vertex.2000"

edge split "edge.3000" percentarclength $HCu connected

vertex cmove "vertex.6" multiple 1 offset (-$Lbm*sin($Angle)) ($Lbm*cos($Angle)) 0

edge split "edge.5000" vertex "vertex.7" connected

edge create straight "vertex.6" "vertex.7"

I've heard about a function called LASTID, but I don't know how to use it. Do you know it ?
  Reply With Quote

Old   April 19, 2006, 06:19
Default Problem solved !
  #4
Cyril
Guest
 
Posts: n/a
I've just found a function : RETLABEL, which returns the last nth entity name used in the model for a specified type of geometric entity, coordinate system, boundary layer, or size function.

Then, I just have to rename the entity (or just use the variable name).

--

edge split "edge_3" percentarclength 0.25 connected

$new_vertex = RETLABEL(t_ve, 1)

vertex modify $new_vertex label "vertex_6" (optional)

edge create "edge_4" straight "vertex_1" "vertex_6" --or-- edge create "edge_4" straight "vertex_1" $new_vertex
  Reply With Quote

Old   April 19, 2006, 06:28
Default One last question : many commands on the same line
  #5
Cyril
Guest
 
Posts: n/a
I've got a last question : Is it possible to have two commands on a same line ?

For example, having...

$renom = RETLABEL(t_ve, 1) and vertex modify $renom label "vertex_6"

...on a same line would make my journal clearer...

(I tried a ';' but it doesn't seem to be working!)
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 02:31.