11#include "../include/var_struc.h"
12#include "../include/file_io.h"
24 double const eps =
config[4];
25 int const Ncell = (int)
config[3];
26 int const Tcell = (int)
config[14];
27 double const dtheta =
config[11];
29 char file_data[FILENAME_MAX];
37 sprintf(str_tmp,
"FLU_VAR_%.8g.tec", time + eps);
38 strcat(file_data, str_tmp);
39 if ((out = fopen(file_data,
"w")) == NULL)
41 fprintf(stderr,
"Cannot open solution output Tecplot file!\n");
45 fprintf(out,
"TITLE = \"Planar Plot of Radially Symmetric Data\"\n");
46 fprintf(out,
"VARIABLES = \"X\", \"Y\"");
47 fprintf(out,
", \"RHO\", \"U\", \"P\"");
48#ifdef MULTIFLUID_BASICS
49#ifndef MULTIPHASE_BASICS
50 fprintf(out,
", \"gamma\"");
55 fprintf(out,
"ZONE I=%d, J=%d, F=POINT, SOLUTIONTIME=%.8g\n", Tcell+1, Ncell+1, time);
56 for(i=0; i<=Ncell; i++)
57 for(j=0; j<=Tcell; j++)
59 fprintf(out,
"%.10g\t",R[i]*cos(j*dtheta));
60 fprintf(out,
"%.10g\t",R[i]*sin(j*dtheta));
61 fprintf(out,
"%.10g\t",FV.
RHO[i]);
62 fprintf(out,
"%.10g\t",FV.
U[i]);
63 fprintf(out,
"%.10g\t",FV.
P[i]);
64#ifdef MULTIFLUID_BASICS
65#ifndef MULTIPHASE_BASICS
66 fprintf(out,
"%.10g\t",FV.
gamma[i]);
void file_radial_write_TEC(const struct flu_var FV, const double *R, const char *problem, const double time)
This function write the radially symmetric 2-D solution into Tecplot output '.tec' files.
double config[N_CONF]
Initial configuration data array.
void example_io(const char *example, char *add_mkdir, const int i_or_o)
This function produces folder path for data input or output.
pointer structure of FLUid VARiables array.