Page 5 - Demo
P. 5


                                    Planar Truss Example for Comrel Add-on RCP Consult, 2023-2025 Page 5 sprintf(buffer, \ StrurelName,StrurelModule,StrurelVersion); GnuplotPut(nf, buffer); if(StrurelMode == 0) // 0 - initial deterministic state {// Input data at state of mean values GnuplotPut(nf, \ } else {// Final data of stochastic solution sprintf(buffer, \ StrurelIMET,StrurelIOPT); GnuplotPut(nf, buffer); sprintf(buffer, \ StrurelBeta,StrurelPf); GnuplotPut(nf, buffer); }// X and Y coordinates in m double XY[nfe][ned]={{0, 0},{4, 0},{8, 0},{12, 0},{16, 0},{20, 0},{24, 0},{22, 2},{18, 2},{14, 2},{10, 2},{6, 2},{2, 2}}; switch(np) { case 1: //*# plot set #1// Set a main subtitle of plot GnuplotPut(nf, \// Plot initial state of truss double v[2][2], sc; sc=2.; for(int n=0; n 0. ? \: \ sprintf(buffer, \co); GnuplotPlotData(nf, buffer, (double *)XYrot, ned, nbd+1); sprintf(buffer, \NN[e], x, y); GnuplotPut(nf, buffer); }break; case 3: //*# plot set #3// Set a main subtitle of plot GnuplotPut(nf, \_v [MPa]' at 12.,8. center font 'Arial,16'\// Prepare color mapping - take Jet palette GnuplotPut(nf, \000',7 '#ee0000',8 '#7f0000')\// Find minimal and maximal values of von Mises stress #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) double minA=1.e6, maxA=-1.e6, ddA; for(int e=0; e
   1   2   3   4   5   6   7   8   9   10