|
[Sponsors] |
November 7, 2017, 04:31 |
ANSYS Fluent - udf, write to file
|
#1 |
New Member
Ivan
Join Date: Nov 2012
Location: Czech Republic
Posts: 22
Rep Power: 14 |
Dear friends,
I would like to ask you how to write some data from the udf during the simulation. Concretely, I mean the data from the tutorial dynamic mesh with the code from valve.c through some function. How to use the function in the code. Regards, Ivan Here is a part of the code: static void write_data(FILE *fp) { int i, j; for(i=0; i<NO_OF_VALVES; i++) { fprintf(fp, "%e ", current_vel_mag[i]); } fprintf(fp, "\n"); for(i=0; i<NO_OF_VALVES; i++) { for(j=0; j<ND_ND; j++) { fprintf(fp, "%e ", cur_r_rp[i][j]); } fprintf(fp, "\n"); } fprintf(fp, "\n"); for(i=0; i<NO_OF_VALVES; i++) { fprintf(fp, "%e ", previous_time[i]); } } DEFINE_RW_FILE(writer, fp) { Message0("Writing UDF data to data file...\n"); #if PARALLEL #if RP_HOST write_data(fp); #endif #else write_data(fp); #endif } |
|
November 16, 2017, 04:11 |
|
#2 | |
Senior Member
Join Date: Feb 2010
Posts: 164
Rep Power: 17 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 04:30 |
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 | ordinary | OpenFOAM Installation | 19 | September 3, 2019 19:13 |
[OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X | gschaider | OpenFOAM Installation | 136 | October 10, 2017 18:25 |
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch | gschaider | OpenFOAM Installation | 225 | August 25, 2015 20:43 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 12:44 |