Page 5 - Demo
P. 5
Planar Truss Examplefor ComrelAdd-onRCPConsult, 2023-2025Page 5sprintf(buffer,\ho,he);GnuplotPut(nf,buffer);GnuplotPut(nf,\1\GnuplotPut(nf,\// Plot a main subtitle of plotsprintf(buffer,\StrurelName,StrurelModule,StrurelVersion);GnuplotPut(nf,buffer);if(StrurelMode==0)// 0 initial deterministic state{// Input data at state of mean valuesGnuplotPut(nf,\1.,5.0 font 'Arial,12'\}else{// Final data of stochastic solutionsprintf(buffer,\1.,5.0 font 'Arial,12'\StrurelIMET,StrurelIOPT);GnuplotPut(nf,buffer);sprintf(buffer,\StrurelBeta,StrurelPf);GnuplotPut(nf,buffer);}// X and Y coordinates in mdoubleXY[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){case1://*# plot set #1// Set a main subtitle of plotGnuplotPut(nf,\// Plot initial state of trussdoublev[2][2],sc;sc=2.;for(intn=0;n0.?\:\sprintf(buffer,\co);GnuplotPlotData(nf,buffer,(double*)XYrot,ned,nbd+1);sprintf(buffer,\NN[e],x,y);GnuplotPut(nf,buffer);}break;case3://*# plot set #3// Set a main subtitle of plotGnuplotPut(nf,\_v [MPa]' at 12.,8. center font 'Arial,16'\// Prepare color mapping take Jet paletteGnuplotPut(nf,\000',7 '#ee0000',8 '#7f0000')\// Find minimal and maximal values of von Mises stress#defineMIN(a,b)(((a)<(b))?(a):(b))#defineMAX(a,b)(((a)>(b))?(a):(b))doubleminA=1.e6,maxA=-1.e6,ddA;for(inte=0;e