Skip to content

Instantly share code, notes, and snippets.

@zhulianhua
Created September 4, 2016 08:21
Show Gist options
  • Save zhulianhua/86a52214be84f0d173e7ac69344191a0 to your computer and use it in GitHub Desktop.
Save zhulianhua/86a52214be84f0d173e7ac69344191a0 to your computer and use it in GitHub Desktop.
store CFD cell centered data in tecplot
if( ( fp=fopen(fname,"w"))==NULL) {printf(" File Open Error\n");exit(1);}
fprintf(fp,"TITLE=%s\n","Cavity_3D");
fprintf(fp,"Variables=%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s \n","X","Y","Z","RHO","Ux","Uy","Uz","Temperature","qx","qy","qz");
fprintf(fp,"Zone I=%d, J=%d, K=%d, DATAPACKING=BLOCK, VARLOCATION=([4,5,6,7,8,9,10,11]=CELLCENTERED) \n",(M),(N),(Q));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment