|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
m.n
Join Date: Jul 2016
Posts: 2
Rep Power: 0 ![]() |
Hello
I want to write a udf in fluent. How can i save the coordinate of zone's cells in a part of a domain in a (((.txt)))file? Thanks a lot. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
m.n
Join Date: Jul 2016
Posts: 2
Rep Power: 0 ![]() |
Hello
How can save all for example a varriable which is acted in some cells in a thread ? for eample i want to save all variation in cells for source term in this code? how can i do? thanks #include "udf.h" #include "stdio.h" #define RO 1.222 #define k 4 #define V 10 #define R 60 #define q 2.83 #define cl 0.5 #define cd 0.6 DEFINE_SOURCE(momentom_x_source,c,t,dS,eqn) {FILE *pf; real source; cell_t c; face_t f; Thread *c_thread; real position[ND_ND]; //real phi[25]; real x,y,U,i; begin_c_loop(c,t) { C_CENTROID(position,c,t); x=position[0]; y=position[1]; for(i=1;i=25;i++) C_UDMI(c,t,i)=y; end source=C_U(c,t)*y; dS[eqn]=y; } end_c_loop(c,thread) if(NULL == (pf = fopen("ffff.txt","a"))) Error("Could not open file for append!\n"); fprintf(pf,"%f\n",source); fclose(pf); return source; } |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF Compilation Error - Loading Library - COMMON Problem! Help! | robtheslob | Fluent UDF and Scheme Programming | 8 | July 24, 2015 01:53 |
Parallelize UDF? Which kind of UDF? | Lilly | FLUENT | 5 | March 25, 2014 03:05 |
Help! Delete the UDM codes in the UDF | Messi | Fluent UDF and Scheme Programming | 2 | January 28, 2014 10:01 |
Programing a UDF | poper | FLUENT | 3 | January 31, 2008 04:27 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |