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

reproducing similar curves with non-uniform radius of curvature in CFX post

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 4, 2015, 15:22
Default reproducing similar curves with non-uniform radius of curvature in CFX post
  #1
Senior Member
 
ali
Join Date: Oct 2009
Posts: 318
Rep Power: 18
alinik is on a distinguished road
Friends,

I have to plot some quantity(let's say pressure) on a weird curve that I have defined using polyline (Method: from file). Now the case is I would like to also plot the same quantity on 55 other curves that are located at different distance from this original curve. The problem is producing 54 other curves using this method is going to be very tedious.
I am looking to find a way to generate all of them in CFX post. The problem is this curve does not have constant radius of curvature and hence I cannot reproduce these curves just by scaling or moving.
Does any body have a solution?
alinik is offline   Reply With Quote

Old   November 4, 2015, 16:27
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Script the generation of the curve so you can generate all the polyline point variations together. Note this is likely to be outside of CFD-Post, using a script or batch file or something like that.

Then use a CFD-Post session file to script opening the polyline and exporting the data you want.
ghorrocks is offline   Reply With Quote

Old   November 4, 2015, 17:52
Default
  #3
Senior Member
 
ali
Join Date: Oct 2009
Posts: 318
Rep Power: 18
alinik is on a distinguished road
Thank you Glenn for your prompt reply.
How exactly can I script this? I already looked a little bit in the tutorial and online resources but could not find an example.
Do you have an example so that I can learn from it?

Thanks again,
Ali
alinik is offline   Reply With Quote

Old   November 4, 2015, 19:00
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
I assume you mean the CFD-Post session files? The easiest way to start on them is to turn recording on, then use CFD-Post to do an example of one file of what you want to do. It will generate the session file, and you can edit it to do looping, or repeat many times or conditional stuff or whatever you like.
ghorrocks is offline   Reply With Quote

Old   November 5, 2015, 01:17
Default
  #5
Senior Member
 
ali
Join Date: Oct 2009
Posts: 318
Rep Power: 18
alinik is on a distinguished road
Got it Glenn

Thank you
alinik is offline   Reply With Quote

Old   November 5, 2015, 01:45
Default
  #6
Senior Member
 
ali
Join Date: Oct 2009
Posts: 318
Rep Power: 18
alinik is on a distinguished road
Just one thing...
I import the points for constructing the original curve from a .csv file. let's assume I have turned on the "record" in order to make a session file. Now that I have imported the points and would like to construct the second curve from the imported points, how can I, in the session file, address the X and Y of the points in the original curve? I know what equations to use to find the X and Y coordinates of the points on second curve if only I can somehow address coordinates of the original points.
If I want to do that outside of CFX post I would use Excel to build another .csv file which contains the coordinates of points of the second curve.

I hope I made it clear what my problem is. If not let me know and I will explain more in details.
alinik is offline   Reply With Quote

Old   November 5, 2015, 18:29
Default
  #7
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
I would generate all the curves and save them as different CSV files. Then in CFD-Post you can load the CSV files and do whatever processing you like on them. From your recorded session file you can add looping and conditional stuff so it can run over many CSV files.
ghorrocks is offline   Reply With Quote

Old   November 5, 2015, 23:32
Default
  #8
Senior Member
 
ali
Join Date: Oct 2009
Posts: 318
Rep Power: 18
alinik is on a distinguished road
That was the whole point of it. I did not want to generate all those curves by excel and import them into CFX post. The problem was with the huge number of curves in the beginning.
I wanted to somehow create on curve only and then somehow create all others using from the original one and mathematical relations.
alinik is offline   Reply With Quote

Old   November 6, 2015, 00:44
Default
  #9
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Then you have a few way of doing that:
* You can script excel as well. Get it to generate all the files automatically. Look at VBA.
* Use python/matlab or something like that to read in your CSV file and automatically generate all the variations
ghorrocks is offline   Reply With Quote

Old   November 6, 2015, 01:06
Default Limited Options in Post
  #10
New Member
 
balaji_hrrn's Avatar
 
Fluidic Heat
Join Date: Nov 2011
Location: India
Posts: 16
Rep Power: 15
balaji_hrrn is on a distinguished road
Hi,

You have very little options in CFD post to do it. My way of tackling this problem is to code it in excel to generate and write out, and modify a created session file in CFD Post to import them all at once.

VBA - CCL integration is easy and you do not need high level programming skills to do that. It will be better if you can post two of the example file data, and the mathematical relation that you are trying to implement, so that we can understand your concern better.
balaji_hrrn 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
Boundary Conditions MtnRunBeachBum OpenFOAM Pre-Processing 1 April 30, 2015 17:33
LES supersonic free jet martyn88 OpenFOAM 22 April 17, 2015 07:00
OpenFOAM solution is diverging for stress analysis in two-pahse microstructure. Sargam05 OpenFOAM 16 April 30, 2013 17:18
Problems with Turbulence Modeling ezsoal OpenFOAM Running, Solving & CFD 4 November 26, 2009 16:12
RasInterFoam STRANGE RESULTS AT BOUNDARY kumar2 OpenFOAM Running, Solving & CFD 8 March 24, 2008 19:38


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