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

Surface Points

Register Blogs Community New Posts Updated Threads Search

Like Tree17Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 16, 2010, 12:39
Question Surface Points
  #1
New Member
 
Yarzar
Join Date: May 2010
Posts: 22
Rep Power: 16
ATOTA is on a distinguished road
Hello,
I have a question about surface points. I know I could input the coordinates in the surface->points option but I have over 200 points to monitor. It drives me crasy to look at a bunch of numbers and to type the coordinates. Is there away to automatically get the points either from the meshing and geometry or maybe importing it from Excel ??

Thanks,
ATOTA
ATOTA is offline   Reply With Quote

Old   July 16, 2010, 14:31
Default
  #2
Senior Member
 
Chris
Join Date: Jul 2009
Location: Ohio, USA
Posts: 169
Rep Power: 17
Chris D is on a distinguished road
I would write a macro in scheme to do this. Here's an overview of what you need to do.

First, understand that you can use the tui (text user interface) instead of the gui to execute commands. You could create a point monitor by going to Surface-->Point, creating a point, and then Solve-->Monitors-->Surface, and the clicking around to set a point monitor for temperature, for example. Another way to do this (with the tui) is to type surface/point, at which point you'll be prompted to enter the x, y, and z coordinates of the point, and then solve/monitor/surface/set-montor and input a name for the monitor, report type ("Vertex Average"), quantity to monitor (temperature), surface for monitor (point-2), etc.

Another way yet is to execute the following two commands:

surface/point-surface point-8 0 0 0
solve/monitors/surface/set-monitor monitor-9 "Vertex Average" temperature point-8 () n y n 1

If you copy the commands individually into the tui and execute them, you'll see that the monitor was created.

Rather than type the commands into the tui yourself, you can use a macro to load the commands. The following macro will also create a point monitor:

(ti-menu-load-string "surface/point-surface point-9 0 0 0")
(ti-menu-load-string "solve/monitors/surface/set-monitor monitor-9 \"Vertex Average\" temperature point-8 () n y n 1")

If you copy that into a text file, you can execute it by going to File-->Read-->Scheme... browse to the directory, select "all files", and open the text file.

The next step is to write a program to loop over these commands to create all of your monitors. The program would also need to access a file with your coordinates of the points. Here's a sketch of what it would look like (written in bad psuedo-scheme):

(do ( from i = 1 to 200)
(define xcoord (;get the x coordinate from some file))
(define ycoord (;get the x coordinate from some file))
(define zcoord (;get the x coordinate from some file))

; build up a string to load into the tui to create point i
; build up a string to load to create point monitor i
)

I hope this isn't too confusing. I was basically trying to show you how to use the tui, let you know that you can use macros written in scheme to load commands into the tui, and give you a rough idea of how to do it. To actually write the program would take me some time, as I'm not really good at writing in scheme, but if I can help in anyway, let me know. If you google around for scheme programming information, you would find more information about scheme. Good luck!
mozkan26, kiran, protussa and 8 others like this.
Chris D is offline   Reply With Quote

Old   July 16, 2010, 15:31
Default
  #3
New Member
 
Yarzar
Join Date: May 2010
Posts: 22
Rep Power: 16
ATOTA is on a distinguished road
Thank you very much ! I really appreciate it.
I am not so sure about the programming part but I will look in to it

Another question
surface/point-surface point-8 0 0 0
solve/monitors/surface/set-monitor monitor-9 "Vertex Average" temperature point-8 () n y n 1

is 8 0 0 0 the coordinates ??
or what is it ?

Thanks Again
ATOTA is offline   Reply With Quote

Old   July 16, 2010, 15:55
Default
  #4
Senior Member
 
Chris
Join Date: Jul 2009
Location: Ohio, USA
Posts: 169
Rep Power: 17
Chris D is on a distinguished road
It's just like you input the commands individually as you were prompted by fluent. So:

surface/point-surface <enter>
name: point-8 <enter>
x-coord: 0 <enter>
y-coord: 0 <enter>
z-coord: 0 <enter>

becomes:
surface/point-surface point-8 0 0 0

This works for all tui commands. It allows you to enter everything on one line, rather than waiting to be prompted by fluent.
Chris D is offline   Reply With Quote

Old   July 17, 2010, 13:18
Default
  #5
New Member
 
Yarzar
Join Date: May 2010
Posts: 22
Rep Power: 16
ATOTA is on a distinguished road
Thank you very much...you're a life saver !
ATOTA is offline   Reply With Quote

Old   July 17, 2010, 13:51
Default
  #6
Senior Member
 
Chris
Join Date: Jul 2009
Location: Ohio, USA
Posts: 169
Rep Power: 17
Chris D is on a distinguished road
No problem! Did you get it working? I thought about it a little bit more, and I realized that you can do this with a spreadsheet instead of writing a scheme program:

Screenshot.jpg
Chris D is offline   Reply With Quote

Old   July 17, 2010, 13:57
Default
  #7
New Member
 
Yarzar
Join Date: May 2010
Posts: 22
Rep Power: 16
ATOTA is on a distinguished road
Yeh I used a spreadsheet and it worked beautifully.
ATOTA is offline   Reply With Quote

Old   July 26, 2010, 22:08
Default
  #8
New Member
 
Yarzar
Join Date: May 2010
Posts: 22
Rep Power: 16
ATOTA is on a distinguished road
Hello again Chris D,
I'm sorry to bother you again and again but could you answer another question about the points please ?
Could you explain to me what () n y n 1") does? I was able to create the points but now my boss wants me to make them monitors.

Thanks for all the help !
ATOTA is offline   Reply With Quote

Old   July 27, 2010, 12:29
Default
  #9
Senior Member
 
Chris
Join Date: Jul 2009
Location: Ohio, USA
Posts: 169
Rep Power: 17
Chris D is on a distinguished road
solve/monitors/surface/set-monitor monitor-9 "Vertex Average" temperature point-8 () n y n 1:

point-8 : surface for the monitor
() : terminates the surface input list.

the next three (n, y, n) are yes/no answers to whether or not you want to plot the monitor, print the monitor, and save the monitor data. (I'm not 100% sure of the order of the inputs, as I don't have fluent in front of me right now. It can be checked by manually creating a monitor with the tui and noting the input prompts.) The last input is for the reporting interval for the monitor. In this case, every iteration.

Note that if you answer "yes" to save the monitor data, you will be prompted to input the name of the output data file, so the script will need to be modified to include that. The filename must be enclosed with double quotes, as it's a string, and you can use / instead of \ to separate directories, which prevents you from accidentally entering an escape character. One important point is that you need to escape the " like you did for the name "Vertex Average". So your input would look like this:

\"c:/directory/another/monitor1.out\"
metmet likes this.
Chris D is offline   Reply With Quote

Old   July 28, 2010, 11:54
Default
  #10
New Member
 
Yarzar
Join Date: May 2010
Posts: 22
Rep Power: 16
ATOTA is on a distinguished road
Thanks !
I think I'm getting it.
ATOTA is offline   Reply With Quote

Old   July 28, 2010, 16:40
Default
  #11
New Member
 
Yarzar
Join Date: May 2010
Posts: 22
Rep Power: 16
ATOTA is on a distinguished road
Ok it is kinda working and it made the monitors.
but it won't let me change it from iteration to time-step.

It should be the last thing I should have on the command line.

This is what I have
solve/monitors/surface/set-monitor monitor-lv1a1 "Vertex Average" x-velocity point-lv1a1 () n y y \"c:/documents and settings/user/desktop/lv1a1 \ " 1 y time-step


it does not take in the 1 y time-step part.
I remember when I actually typed them in, it prompt me for it before and the sequence was frequency>axis>time-step

Now it doesn't anymore...
I'm really going crazy with this...
DO you know what I might have changed accidentally that caused Fluent to stop asking me for axis and time-step.
ATOTA is offline   Reply With Quote

Old   July 28, 2010, 17:15
Default
  #12
Senior Member
 
Chris
Join Date: Jul 2009
Location: Ohio, USA
Posts: 169
Rep Power: 17
Chris D is on a distinguished road
The problem might be the space between the \ and ".

Strings are enclosed by "", so you need an escape character to actually be able to include a " in a string. Otherwise, the interpreter thinks you're ending the string. In your case, you have

(ti-menu-load-string "some stuff \"c:/documents and settings/user/desktop/lv1a1 \ " 1 y time-step")

where the blue text is the string that is being loaded. Since the "1 y time-step" is not in the string, and ti-menu-load-string expects one string as an argument, you get an error. What you want is

(ti-menu-load-string "some stuff \"c:/documents and settings/user/desktop/lv1a1 \" 1 y time-step")

By putting a space in between the \ and ", the \ is just part of the string and doesn't escape like you want. Long answer, but hopefully it will make more sense now.
Chris D is offline   Reply With Quote

Old   July 28, 2010, 18:14
Default
  #13
New Member
 
Yarzar
Join Date: May 2010
Posts: 22
Rep Power: 16
ATOTA is on a distinguished road
I don't think that's the case...
I typed in the same things in the TUI to see what's going on and Fluent itself didn't give me the option to enter the last part.
It was working yesterday. I don't know what went wrong.
ATOTA is offline   Reply With Quote

Old   July 28, 2010, 18:42
Default
  #14
Senior Member
 
Chris
Join Date: Jul 2009
Location: Ohio, USA
Posts: 169
Rep Power: 17
Chris D is on a distinguished road
Did you switch from the steady state solver to the transient solver? You probably won't have the time step option if it's steady.
Chris D is offline   Reply With Quote

Old   January 4, 2014, 08:06
Talking
  #15
Member
 
kiran Ambilpur
Join Date: Jun 2010
Location: India
Posts: 50
Rep Power: 16
kiran is on a distinguished road
Send a message via Skype™ to kiran
Thanks Chris

your replies completely saves time and life's....

Thank you very much....
kiran is offline   Reply With Quote

Old   June 25, 2014, 11:43
Default
  #16
New Member
 
Alex Buckman
Join Date: Nov 2013
Posts: 1
Rep Power: 0
alexbuckman is on a distinguished road
Again, thanks Chris, this kind of informations is utterly hard to find and you explained it perfectly.
alexbuckman is offline   Reply With Quote

Old   December 13, 2015, 00:38
Default TUI xy plot problem
  #17
New Member
 
Dilesh
Join Date: Oct 2014
Posts: 2
Rep Power: 0
dilesh is on a distinguished road
Hello
I am having problem with tui command. I am trying to plot (xy plot) using tui command. But I cannot figure out how to terminate the surfaces at the end.

This is what I have:
plot/plot yes temp-100W-he-1atm yes no no temperature yes 0 0 1 line-mpa1 line-mpb3 line-mpc3 line-mpc4 line-mpd4

I don't know what to use at the end to terminate the command.
dilesh is offline   Reply With Quote

Old   December 14, 2015, 01:07
Default
  #18
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by dilesh View Post
Hello
I am having problem with tui command. I am trying to plot (xy plot) using tui command. But I cannot figure out how to terminate the surfaces at the end.

This is what I have:
plot/plot yes temp-100W-he-1atm yes no no temperature yes 0 0 1 line-mpa1 line-mpb3 line-mpc3 line-mpc4 line-mpd4

I don't know what to use at the end to terminate the command.
Try typing in () which is the empty argument.
LuckyTran is offline   Reply With Quote

Old   April 5, 2016, 19:12
Default disapearing surface points
  #19
New Member
 
Join Date: Feb 2016
Posts: 9
Rep Power: 10
Supersonic is on a distinguished road
I have input 100 surface points to use for model validation and mesh independence but every time I close fluent, they disappear. Does anyone else have this problem or know a solution?
Supersonic is offline   Reply With Quote

Old   April 5, 2016, 20:23
Default
  #20
New Member
 
Dilesh
Join Date: Oct 2014
Posts: 2
Rep Power: 0
dilesh is on a distinguished road
Did you write the case file again after you have generated those points?
dilesh is offline   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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Gmsh] Error : Self intersecting surface mesh, computing intersections & Error : Impossible velan OpenFOAM Meshing & Mesh Conversion 3 October 22, 2015 12:05
[Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 03:09
[Gmsh] boundaries with gmshToFoam‏ ouafa OpenFOAM Meshing & Mesh Conversion 7 May 21, 2010 13:43
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 08:36
CFX4.3 -build analysis form Chie Min CFX 5 July 13, 2001 00:19


All times are GMT -4. The time now is 04:44.