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

Importing surface/profile for data writing in Fluent

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 25, 2013, 15:13
Default Importing surface/profile for data writing in Fluent
  #1
New Member
 
Daniel
Join Date: Dec 2011
Posts: 14
Rep Power: 15
fadiga is on a distinguished road
Hi all.

I have a series of calculations which need to be done on a model geometry, with slightly varying interal dimensions. However there are locations in this geometry which are constant and which I need to extract the data from. I need to run the simulation in transient so I need to define these "lines" during pre-post in order to write and export the data per time step. Since I have to do quite a few, it would be nice to be able to write the coordinates file once, and then just import it each time....

Do you know of any way to import "surfaces" (as per the Fluent definition of a surface) which you can then use to define the locations of the data you need to write?

I tried already to create and read "profiles", with just coordinates but then I cannot the select the profile under surfaces when I try to write the data.

(i attached snapshot of the relevant command window i refer to)

Thanks for your help!
Attached Images
File Type: jpg export.jpg (52.1 KB, 124 views)
fadiga is offline   Reply With Quote

Old   July 10, 2014, 13:52
Default
  #2
New Member
 
Sreeraj Varma
Join Date: Jun 2014
Posts: 8
Rep Power: 12
sreerajvarma is on a distinguished road
Hi
I am also facing the same problem. I jist want to import transient data for the whole simulation at a few locations like wall.Could anyone help? I require this because otherwise the data will be too large and i will not be able to store\process it


Thank you

Last edited by sreerajvarma; July 10, 2014 at 13:59. Reason: for more clarity
sreerajvarma is offline   Reply With Quote

Old   July 11, 2014, 14:25
Default
  #3
New Member
 
Sreeraj Varma
Join Date: Jun 2014
Posts: 8
Rep Power: 12
sreerajvarma is on a distinguished road
Quote:
Originally Posted by sreerajvarma View Post
Hi
I am also facing the same problem. I jist want to import transient data for the whole simulation at a few locations like wall.Could anyone help? I require this because otherwise the data will be too large and i will not be able to store\process it


Thank you
Hi
I'm just a beginner in Fluent Udf and want to simulate a shock tube. But since I do not have space to store the large amount of data generated from the solution I would like to save data at just a few particular locations. For this I wrote the UDF given below.

#include "udf.h"

DEFINE_INIT(sree_shock_tube_init,d)
{
cell_t c;
Thread *t;
float xc[ND_ND];

thread_loop_c(t,d)
{
begin_c_loop_all(c,t)
{

C_CENTROID(xc,c,t);

if (xc[0] < 3.2 )
{
C_U(c,t) = 0.;
C_V(c,t) = 0.;
C_P(c,t) = 2026500.0;
C_T(c,t) = 300.0;
C_R(c,t) = 23.536;
}

else

{

C_U(c,t) = 0.;
C_V(c,t) = 0.;
C_P(c,t) = 10132.5;
C_T(c,t) = 300.0;
C_R(c,t) = 0.11768;

}

}
end_c_loop_all(c,t)
}
}
DEFINE_RW_FILE(writer,fp)
{
face_t f;
Domain *d;
Thread *t;
float fc[ND_ND];
double pres,tem,vel,vels,mach;
thread_loop_f(t,d)
{
begin_f_loop_all(f,t)

{
F_CENTROID(fc,f,t);
if( fc[0]==0 || fc[0]==3.2 || fc[0]==6.4 || fc[0]==9.6 )

{
pres=F_P(f,t);
tem=F_T(f,t);
vel=F_U(f,t);
vels=pow(1.4*287.002*tem,0.5);
mach=vel/vels;
fprintf(fp,"%f: %f: %f: %f",pres,tem,vel,mach);

}

}
end_f_loop_all(f,t)

}

}

But when I interpret this code in fluent I get parse error on line no: 54 and 71. Could anyone tell why this error comes. I am just a beginner in Fluent and also doesn't have much experience in handling C

Best Regards

Last edited by sreerajvarma; July 12, 2014 at 02:16.
sreerajvarma is offline   Reply With Quote

Old   July 11, 2014, 15:05
Default
  #4
New Member
 
Sreeraj Varma
Join Date: Jun 2014
Posts: 8
Rep Power: 12
sreerajvarma is on a distinguished road
I removed the parse errors and the udf is interpreting fine.But when I try to run the above UDF in ansys Fluent and calculate I receive the following error message:
Error: Received fatal signal (segmentation fault). and it closes automatically
I guess it must be problem in the udf coding. I also hooked the function in both write cas and data initially and later tried hooking only to write data file alone. I want to save the pressure , temperture velocity and mach no: at a few locations alone and later use them in cfd post.
Could anyone suggest a solution to this problem

Last edited by sreerajvarma; July 12, 2014 at 02:25.
sreerajvarma is offline   Reply With Quote

Old   July 12, 2014, 02:23
Default
  #5
New Member
 
Sreeraj Varma
Join Date: Jun 2014
Posts: 8
Rep Power: 12
sreerajvarma is on a distinguished road
When I try to run the above UDF in ansys Fluent and calculate I receive the following error message:
Error: Received fatal signal (segmentation fault). and it closes automatically
I guess it must be problem in the udf coding. I also hooked the function in both write cas and data initially and later tried hooking only to write data file alone. I want to save the pressure , temperture velocity and mach no: at a few locations alone and later use them in cfd post.
Could anyone suggest a solution to this problem
sreerajvarma is offline   Reply With Quote

Reply

Tags
export, fluent, import, profile


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
How to Mix AIR and WATER Elvis1991 FLUENT 12 December 1, 2016 13:28
UDF in FLUENT for importing csv files Boo Fluent UDF and Scheme Programming 0 July 13, 2011 23:22
importing .stl file to Fluent snudurupati FLUENT 0 July 15, 2009 12:21
importing unmeshed surface from gambit to fluent NISHIKANT TAMRAKAR FLUENT 1 March 7, 2009 15:08
Importing a structured mesh into Fluent Flav FLUENT 0 November 30, 1999 11:57


All times are GMT -4. The time now is 13:59.