SlideShare a Scribd company logo
>> IN THE NAME OF GOD <
Critical Buckling Load Geometric Nonlinearity Analysis of Springs with Rigid Element
Displacement Control Large Deformation Formulated in C programming
C program is written by Salar Delavar Qashqai – Publication Date: 08/April/2021
E-mail: salar.d.ghashghaei@gmail.com
C Code:
#include <stdio.h>
#include <windows.h> // text color
#include <conio.h>
#define N 10000
#define ShowText01 "RigidElementSpringDCStrainGNPcr-inputDATA.csv"
#define ShowText02 "RigidElementSpringDCStrainGNPcr-outputEXCEL.csv"
#define ShowText03 "RigidElementSpringDCStrainGNPcr-outputMATLAB.m"
#define ShowText04 "Graph-outputHTML.html"
void IMPORT_DATA01(double Import_Data[]);
void MessageNegative_IMPORT_DATA01(double Import_Data[]);
void MessageInputDataTEXT();
void MessageAnalysisReportTEXT();
void MessageErrorReportTEXT();
void MessageInitialData(double Import_Data[],int n);
void MessageStarinStressTEXT(double STARIN01[],double STRESS01[],double STARIN02[],double STRESS02[],int n);
void textcolor(int ForgC);
void Distance(int i);
void ANALYSIS(double Import_Data[],int n,int m);
double ABS(double B);
double Horizental_Disp(double L,double &x,double y);
double SQRT2(double D);
double MAX_ABS(double A[],int n);
void OUTPUT_excel(double A[],double B[],double C[],int n);
void OUTPUT_HTML_GRAPH(double X[],double Y[],int n,const char text1[],const char text2[],const char text3[]);
int main(){
int k;
double Import_Data[13];
IMPORT_DATA01(Import_Data);
MessageNegative_IMPORT_DATA01(Import_Data);
int m = 1 + ABS(Import_Data[12]/Import_Data[10]);
textcolor(10);
MessageInitialData(Import_Data,m);
textcolor(14);
ANALYSIS(Import_Data,k,m);
getch();
return 0;
}
void IMPORT_DATA01(double Import_Data[]){
int i=0;
FILE *InputFile;
InputFile = fopen(ShowText01, "r");
if (!InputFile){
MessageErrorReportTEXT();
printf(" File is not available! -> [%s] n",ShowText01);
Sleep(6000);
exit(1);
}
char line[100],a[100];
while(i < N && fgets(line,sizeof(line),InputFile) != NULL){
sscanf(line,"%s",a);
//printf("a[%d]: %sn",i,a);
Import_Data[i]= atof(a);
i++;
}
}
void MessageNegative_IMPORT_DATA01(double Import_Data[]){
if ( Import_Data[0] < 0 || Import_Data[1] < 0 || Import_Data[2] < 0 || Import_Data[3] < 0 || Import_Data[4] < 0 || Import_Data[5] < 0 || Import_Data[10] < 0|| Import_Data[12] < 0){
MessageErrorReportTEXT();
printf(" Please check this file! -> [%s]n",ShowText01);
printf(" *** Negative data input value is not acceptable ***n");
printf(" Rotational Spring Stiffness: %fn",Import_Data[0]);
printf(" Length of rigid element: %fn",Import_Data[1]);
printf(" Spring length 1: %fn",Import_Data[2]);
printf(" Spring length 2: %fn",Import_Data[3]);
printf(" Spring area 1: %fn",Import_Data[4]);
printf(" Spring area 2: %fn",Import_Data[5]);
printf(" Spring modulus of elasticity 1: %fn",Import_Data[6]);
printf(" Spring modulus of elasticity 2: %fn",Import_Data[7]);
printf(" External applied load in spring 1: %fn",Import_Data[8]);
printf(" External applied load in spring 2: %fn",Import_Data[9]);
printf(" Initial applied displacement: %fn",Import_Data[10]);
printf(" Distance of spring 1 from rigid element: %fn",Import_Data[11]);
printf(" Ultimate absolute displacement: %fn",Import_Data[12]);
Sleep(40000);
exit(1);
}
}
void textcolor(int ForgC){
WORD wColor;
//This handle is needed to get the current background attribute
HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO csbi;
//csbi is used for wAttributes word
if(GetConsoleScreenBufferInfo(hStdOut, &csbi)){
//To mask out all but the background attribute, and to add the color
wColor = (csbi.wAttributes & 0xF0) + (ForgC & 0x0F);
SetConsoleTextAttribute(hStdOut, wColor);
}
return;
}
void MessageErrorReportTEXT(){
int i;
char Ql;
Ql=176;
textcolor(12);
printf("an ");
for (i=1;i<50;i++)
printf("%c",Ql);
printf(" Error Report ");
for (i=1;i<50;i++)
printf("%c",Ql);
printf("n");
}
void MessageInputDataTEXT(){
int i;
char Ql=176;
printf("n ");
for (i=1;i<50;i++)
printf("%c",Ql);
printf(" Input Data ");
for (i=1;i<50;i++)
printf("%c",Ql);
printf("n");
}
void MessageAnalysisReportTEXT(){
int i;
char Ql=176;
printf("n ");
for (i=1;i<47;i++)
printf("%c",Ql);
printf(" Analysis Report ");
for (i=1;i<47;i++)
printf("%c",Ql);
printf("n");
printf("nt ");
for (i=1;i<98;i++)
printf("-");
printf("n");
printf("t Increment Base Shear Incremental Displacement[DOF(1)] Critical Pressure Load n");
printf("t ");
for (i=1;i<98;i++)
printf("-");
printf("n");
}
void Distance(int i){
if (i < 10)
printf("b");
if (i >= 10 && i <= 99)
printf("btb");
if (i >= 100 && i <= 999)
printf("btbb");
if (i >= 1000 && i <= 9999)
printf("btbbb");
if (i >= 10000 && i <= 20000)
printf("btbbbb");
}
double ABS(double B){
if (B < 0)
B = -B;//Absolute number
else
B = B;
return B;
}
void ANALYSIS(double Import_Data[],int n,int m){
double L,Dx,a=0,Le[2],Area[2],Elas[2],Force[2],K[2],Dini,Dmax,Du,up,K_rotation;
int z,well_done=0;
double output_u[N],output_Pcr[N],output_base[N];
K_rotation = Import_Data[0];
L = Import_Data[1];
Le[0] = Import_Data[2];
Le[1] = Import_Data[3];
Area[0] = Import_Data[4];
Area[1] = Import_Data[5];
Elas[0] = Import_Data[6];
Elas[1] = Import_Data[7];
Force[0] = Import_Data[8];
Force[1] = Import_Data[9];
Dini = Import_Data[10];
Du = Import_Data[11];
Dmax = Import_Data[12];
double F[2],LE[2];
MessageAnalysisReportTEXT();
for (z=0;z<m;z++){
up = Dini*(z+1);// Define the applied Displacement
Horizental_Disp(L,Dx,up);
LE[0] = SQRT2((Le[0]+.5*up)*(Le[0]+.5*up)+Dx*Dx);
K[0] = Elas[0]*Area[0]/LE[0];
F[0] = (((Le[0]+.5*up)/LE[0])*((Le[0]+.5*up)/LE[0]))*K[0]*0.5*up + Import_Data[8];
LE[1] = SQRT2((Le[1]-up)*(Le[1]-up) + Dx*Dx);
K[1] = Elas[1]*Area[1]/LE[1];
F[1] = (((Le[1]-up)/LE[1])*((Le[1]-up)/LE[1]))*K[1]*up + Import_Data[9];
output_u[z] = up;
output_Pcr[z] = (-Import_Data[8]*((.5*L*L)/(L-Dx))-Import_Data[9]*((L*L)/(L-Dx))+F[0]*((.5*L*L)/(L-Dx))+F[1]*((L*L)/(L-Dx))+K_rotation*(up/(L-Dx)))/up;//up/(L-Dx)
output_base[z] = F[0] + F[1];
Distance(z);
printf("tt%dtt%ett%ettt%en",z+1,output_base[z],output_u[z],output_Pcr[z]);
if (ABS(up) >= Dmax){
well_done = 1;
textcolor(13);
printf("ntt Increment displacement reach to ultimate displacementnn");
break;
}
}// for
if (well_done == 1){
OUTPUT_excel(output_u,output_Pcr,output_base,z);
OUTPUT_HTML_GRAPH(output_u,output_Pcr,z+1,"Displacement - Critical Buckling Load Graph","Displacement","Critical Buckling Load");
textcolor(15);
printf("na - Output data is written in Excel file -");
system("start /w Graph-outputHTML.html");
}
}
void OUTPUT_excel(double A[],double B[],double C[],int n){
// EXCEL OUTPUT
int i;
FILE *OutputFile;
OutputFile = fopen(ShowText02, "w");
fprintf(OutputFile," ### Critical Pressure Load Geometric Nonlinearity Analysis of Springs with Displacement Control Large Deformation Formulated ###n");
fprintf(OutputFile,"Increment,Displacement [DOF(1)],Critical Pressure Load,Base Shearn");
for(i=0;i<n;i++)
fprintf(OutputFile,"%d,%e,%e,%en",i+1,A[i],B[i],C[i]);
fclose(OutputFile);
}
void MessageInitialData(double Import_Data[],int n){
char Qa,Qb,Qc,Qd,Qe,Qf,Qg,Qk;
int i;
Qa=201;Qb=205;Qc=187;Qd=200;Qe=188,Qf=186,Qg=204,Qk=185;
printf("tttt%c",Qa);
for (i=1;i<71;i++)
printf("%c",Qb);
printf("%cn",Qc);
printf("tttt%c >> IN THE NAME OF GOD << %cn",Qf,Qf);
printf("tttt%c Critical Pressure Load Geometric Nonlinearity Analysis of Springs %cn",Qf,Qf);
printf("tttt%c with Displacement Control Large Deformation Formulated %cn",Qf,Qf);
printf("tttt%c UNIT: Free Unit %cn",Qf,Qf);
printf("tttt%c",Qg);
for (i=1;i<71;i++)
printf("%c",Qb);
printf("%cn",Qk);
printf("tttt%c This program is written by Salar Delavar Ghashghaei %cn",Qf,Qf);
printf("tttt%c E-mail: salar.d.ghashghaei@gmail.com %cn",Qf,Qf);
printf("tttt%c",Qd);
for (i=1;i<71;i++)
printf("%c",Qb);
printf("%cn",Qe);
MessageInputDataTEXT();
printf("t Rotational Spring Stiffness: %fn",Import_Data[0]);
printf("t Length of rigid element: %fn",Import_Data[1]);
printf("t Spring length 1: %fn",Import_Data[2]);
printf("t Spring length 2: %fn",Import_Data[3]);
printf("t Spring area 1: %fn",Import_Data[4]);
printf("t Spring area 2: %fn",Import_Data[5]);
printf("t Spring modulus of elasticity 1: %fn",Import_Data[6]);
printf("t Spring modulus of elasticity 2: %fn",Import_Data[7]);
printf("t External applied load in spring 1: %fn",Import_Data[8]);
printf("t External applied load in spring 2: %fn",Import_Data[9]);
printf("t Initial applied displacement: %fn",Import_Data[10]);
printf("t Distance of spring 1 from rigid element: %fn",Import_Data[11]);
printf("t Ultimate absolute displacement: %fn",Import_Data[12]);
printf("t Number of increments: %dn",n);
}
double Horizental_Disp(double L,double &x,double y){
int it,itermax;
double residual,tolerance,dx,dx_ABS,f,df;
it = 0; // initialize iteration count
itermax = 100000;
residual = 100; // initialize residual
tolerance = 1e-12;
x = 1;// initialize answer
while (residual > tolerance){
f = x*x + y*y - 2*L*x;
df = 2*x - 2*L;
dx = f/df;
x -= dx;
residual = ABS(dx); // abs residual
it = it + 1; // increment iteration count
//printf("f: %f -tdx: %f -tresidual: %fn",f,dx,residual);
if (it == itermax){
printf("tSQRT2(number,power) : SQRT2(%f) - iteration: %d -> ## The solution is not converged ##n",y,it);
break;
}
}
if (it < itermax){
//printf("tSQRT(number,power) - SQRT(%f,%f) : %f n",D,n, x);
return x;
}
}
double SQRT2(double D){
int it,itermax;
double residual,tolerance,x,dx,dx_ABS,f,df;
it = 0; // initialize iteration count
itermax = 100000;
residual = 100; // initialize residual
tolerance = 1e-8;
x = 1;// initialize answer
while (residual > tolerance){
f = x*x - D;
df = 2 * x;
dx = f/df;
x= x - dx;
residual = ABS(dx); // abs residual
it = it + 1; // increment iteration count
//printf("f: %f -tdx: %f -tresidual: %fn",f,dx,residual);
if (it == itermax){
printf("tSQRT2(number,power) : SQRT2(%f) - iteration: %d -> ## The solution is not converged ##n",D,it);
break;
}
}
if (it < itermax){
//printf("tSQRT(number,power) - SQRT(%f,%f) : %f n",D,n, x);
return x;
}
}
void OUTPUT_HTML_GRAPH(double X[],double Y[],int n,const char text1[],const char text2[],const char text3[]){
// HTML GRAPH OUTPUT
int i;
double x,y,NorX[N],NorY[N],Xmax,Ymax;
Xmax=MAX_ABS(X,n);
Ymax=MAX_ABS(Y,n);
for (i=0;i<n;i++){
NorX[i] = X[i]/Xmax;
NorY[i] = Y[i]/Ymax;
//printf("t %f %f n",NorX[i],NorY[i]);
}
FILE *OutputFile;
OutputFile = fopen(ShowText04, "w");
fprintf(OutputFile,"<!DOCTYPE HTML><html><body style="background-color:black;"><font color="white"><head><script> n");
fprintf(OutputFile,"window.onload = function(){ n");
fprintf(OutputFile,"var canvas = document.getElementById("myCanvas");var s1 = canvas.getContext("2d");var s2 = canvas.getContext('2d'); n");
fprintf(OutputFile,"var s3 = canvas.getContext("2d");var s4 = canvas.getContext("2d");var s5 = canvas.getContext("2d"); n");
fprintf(OutputFile,"var x=120,y=100,X,Y,Lx=1100,Ly=500,i; n");
fprintf(OutputFile,"s3.beginPath();s3.lineWidth = 3;s3.strokeStyle = "cyan";s3.rect(x,y,Lx,Ly); n");
fprintf(OutputFile,"for(i=0;i<9;i++){s3.moveTo(x+Lx*(i+1)*.1,y+Ly);s3.lineTo(x+Lx*(i+1)*.1,y+Ly-10);}; n");
fprintf(OutputFile,"for(i=0;i<9;i++){s3.moveTo(x,y+Ly*(i+1)*.1);s3.lineTo(x+10,y+Ly*(i+1)*.1);};s3.stroke();n");
fprintf(OutputFile,"s1.beginPath();s1.lineWidth = 3;s1.strokeStyle = "yellow"; n");
for (i=0;i<n-1;i++){
fprintf(OutputFile,"s1.moveTo(%f,%f); n",120+NorX[i]*1100,100+500-NorY[i]*500);
fprintf(OutputFile,"s1.lineTo(%f,%f); n",120+NorX[i+1]*1100,100+500-NorY[i+1]*500);
}
fprintf(OutputFile,"s1.stroke(); n");
fprintf(OutputFile,"s2.beginPath();s2.lineWidth = 1;s2.strokeStyle = "cyan";s2.setLineDash([5, 5]); n");
fprintf(OutputFile,"for(i=0;i<19;i++){s2.moveTo(x+Lx*(i+1)*.05,y);s2.lineTo(x+Lx*(i+1)*.05,y+Ly);} n");
fprintf(OutputFile,"s2.lineWidth = 1;s2.strokeStyle = "cyan";for(i=0;i<19;i++){s2.moveTo(x,y+Ly*(i+1)*.05);s2.lineTo(x+Lx,y+Ly*(i+1)*.05);} s2.stroke();n");
fprintf(OutputFile,"X=x+.25*Lx;Y=.7*y;s4.translate(X,Y);s4.font="30px serif";s4.fillStyle = "#7fff00";s4.fillText("%s",0,0); n",text1);
fprintf(OutputFile,"s4.save();X=-X+.2*x;Y=-Y+y+.6*Ly;s4.translate(X,Y);s4.rotate(3*Math.PI/2);s4.font="15px serif"; n");
fprintf(OutputFile,"s4.fillStyle = "#7fff00";s4.textAlign = "left";s4.fillText("%s",0,0);s4.restore(); n",text3);
fprintf(OutputFile,"s4.save();X=.2*Lx;Y=y+Ly-20;s4.translate(X,Y);s4.rotate(2*Math.PI);s4.font="15px serif";s4.fillStyle = "#7fff00"; n");
fprintf(OutputFile,"s4.textAlign = "left";s4.fillText("%s",0,0);s4.restore(); n",text2);
for(i=0;i<10;i++){
x=.1*(i+1)*Xmax;
fprintf(OutputFile,"s5.save();X=-.29*Lx+Lx*(%d+1)*.1;Y=.3*y+Ly+20;s5.rotate(2*Math.PI);s5.font="16px serif"; n",i);
fprintf(OutputFile,"s5.fillStyle = "#7fff00";s5.textAlign = "left";s5.fillText("%.3e",X,Y);s5.restore(); n",x);
}
for(i=0;i<10;i++){
y=.1*(i+1)*Ymax;
fprintf(OutputFile,"s5.save();X=-.28*Lx-50;Y=Ly+.3*y-Ly*(%d+1)*.1;s5.rotate(2*Math.PI);s5.font="16px serif"; n",i);
fprintf(OutputFile,"s5.fillStyle = "#7fff00";s5.textAlign = "left";s5.fillText("%.3e",X,Y);s5.restore(); n",y);
}
fprintf(OutputFile,"s5.save();X=-.25*Lx;Y=.3*y+Ly+20;s5.rotate(2*Math.PI);s5.font="16px serif";s5.fillStyle = "#7fff00";s5.fillText(0,X,Y);s5.restore(); n");
fprintf(OutputFile,"s5.save();X=-.25*Lx-50;Y=Ly+.3*y;s5.rotate(2*Math.PI);s5.font="16px serif";s5.fillStyle = "#7fff00";s5.textAlign = "left";s5.fillText(0,X,Y);s5.restore();}; n");
fprintf(OutputFile,"</script></head><body><canvas id="myCanvas" width="1300" height="1300" style="border:1px solid black;"></canvas></body></html> n");
fclose(OutputFile);
}
double MAX_ABS(double A[],int n){
int i;
double B[N];
double Amax;
// abs value
for (i=0;i<n;i++){
B[i] = A[i];
if(B[i] < 0)
B[i] = -B[i];
}
// Max of abs
Amax = B[0];
for (i=1;i<n;i++){
if(Amax < B[i])
Amax = B[i];
}
return Amax;
}
Plot :
Figure(1) Analysis file
Figure(2) Input csv file
Figure(3) Displacement-Critical Buckling Load Graph in Html

More Related Content

What's hot

c-programming-using-pointers
c-programming-using-pointersc-programming-using-pointers
c-programming-using-pointers
Sushil Mishra
 
C programms
C programmsC programms
C programms
Mukund Gandrakota
 
C PROGRAMS
C PROGRAMSC PROGRAMS
Os lab file c programs
Os lab file c programsOs lab file c programs
Os lab file c programs
Kandarp Tiwari
 
Cn os-lp lab manual k.roshan
Cn os-lp lab manual k.roshanCn os-lp lab manual k.roshan
Cn os-lp lab manual k.roshan
riturajj
 
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILECOMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
Anushka Rai
 
Cpds lab
Cpds labCpds lab
programs
programsprograms
programs
Vishnu V
 
Data Structures Practical File
Data Structures Practical File Data Structures Practical File
Data Structures Practical File
Harjinder Singh
 
C++ file
C++ fileC++ file
C++ file
Mukund Trivedi
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical File
Ashwin Francis
 
Practical File of C Language
Practical File of C LanguagePractical File of C Language
Practical File of C Language
RAJWANT KAUR
 
Data Structures Using C Practical File
Data Structures Using C Practical File Data Structures Using C Practical File
Data Structures Using C Practical File
Rahul Chugh
 
Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output) Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output)
Aman Deep
 
C++ TUTORIAL 4
C++ TUTORIAL 4C++ TUTORIAL 4
C++ TUTORIAL 4
Farhan Ab Rahman
 
Nonlinear analysis of fixed support beam with hinge by hinge method in c prog...
Nonlinear analysis of fixed support beam with hinge by hinge method in c prog...Nonlinear analysis of fixed support beam with hinge by hinge method in c prog...
Nonlinear analysis of fixed support beam with hinge by hinge method in c prog...
Salar Delavar Qashqai
 
Cquestions
Cquestions Cquestions
Cquestions
mohamed sikander
 
c++ program for Railway reservation
c++ program for Railway reservationc++ program for Railway reservation
c++ program for Railway reservation
Swarup Kumar Boro
 
Lab manual operating system [cs 502 rgpv] (usefulsearch.org) (useful search)
Lab manual operating system [cs 502 rgpv] (usefulsearch.org)  (useful search)Lab manual operating system [cs 502 rgpv] (usefulsearch.org)  (useful search)
Lab manual operating system [cs 502 rgpv] (usefulsearch.org) (useful search)
Make Mannan
 
Computer Science Practical Science C++ with SQL commands
Computer Science Practical Science C++ with SQL commandsComputer Science Practical Science C++ with SQL commands
Computer Science Practical Science C++ with SQL commands
Vishvjeet Yadav
 

What's hot (20)

c-programming-using-pointers
c-programming-using-pointersc-programming-using-pointers
c-programming-using-pointers
 
C programms
C programmsC programms
C programms
 
C PROGRAMS
C PROGRAMSC PROGRAMS
C PROGRAMS
 
Os lab file c programs
Os lab file c programsOs lab file c programs
Os lab file c programs
 
Cn os-lp lab manual k.roshan
Cn os-lp lab manual k.roshanCn os-lp lab manual k.roshan
Cn os-lp lab manual k.roshan
 
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILECOMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
 
Cpds lab
Cpds labCpds lab
Cpds lab
 
programs
programsprograms
programs
 
Data Structures Practical File
Data Structures Practical File Data Structures Practical File
Data Structures Practical File
 
C++ file
C++ fileC++ file
C++ file
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical File
 
Practical File of C Language
Practical File of C LanguagePractical File of C Language
Practical File of C Language
 
Data Structures Using C Practical File
Data Structures Using C Practical File Data Structures Using C Practical File
Data Structures Using C Practical File
 
Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output) Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output)
 
C++ TUTORIAL 4
C++ TUTORIAL 4C++ TUTORIAL 4
C++ TUTORIAL 4
 
Nonlinear analysis of fixed support beam with hinge by hinge method in c prog...
Nonlinear analysis of fixed support beam with hinge by hinge method in c prog...Nonlinear analysis of fixed support beam with hinge by hinge method in c prog...
Nonlinear analysis of fixed support beam with hinge by hinge method in c prog...
 
Cquestions
Cquestions Cquestions
Cquestions
 
c++ program for Railway reservation
c++ program for Railway reservationc++ program for Railway reservation
c++ program for Railway reservation
 
Lab manual operating system [cs 502 rgpv] (usefulsearch.org) (useful search)
Lab manual operating system [cs 502 rgpv] (usefulsearch.org)  (useful search)Lab manual operating system [cs 502 rgpv] (usefulsearch.org)  (useful search)
Lab manual operating system [cs 502 rgpv] (usefulsearch.org) (useful search)
 
Computer Science Practical Science C++ with SQL commands
Computer Science Practical Science C++ with SQL commandsComputer Science Practical Science C++ with SQL commands
Computer Science Practical Science C++ with SQL commands
 

Similar to Critical buckling load geometric nonlinearity analysis of springs with rigid element displacement control large deformation formulated in c programming

week-5x
week-5xweek-5x
week-3x
week-3xweek-3x
'C' language notes (a.p)
'C' language notes (a.p)'C' language notes (a.p)
'C' language notes (a.p)
Ashishchinu
 
Data Structure using C
Data Structure using CData Structure using C
Data Structure using C
Bilal Mirza
 
C lab programs
C lab programsC lab programs
C lab programs
Dr. Prashant Vats
 
C lab programs
C lab programsC lab programs
C lab programs
Dr. Prashant Vats
 
C Programming lab
C Programming labC Programming lab
C Programming lab
Vikram Nandini
 
C Programming Example
C Programming Example C Programming Example
C Programming Example
University of Potsdam
 
Basic c programs updated on 31.8.2020
Basic c programs updated on 31.8.2020Basic c programs updated on 31.8.2020
Basic c programs updated on 31.8.2020
vrgokila
 
DataStructures notes
DataStructures notesDataStructures notes
DataStructures notes
Lakshmi Sarvani Videla
 
The solution manual of c by robin
The solution manual of c by robinThe solution manual of c by robin
The solution manual of c by robin
Abdullah Al Naser
 
Chapter 8 c solution
Chapter 8 c solutionChapter 8 c solution
Chapter 8 c solution
Azhar Javed
 
BCSL 058 solved assignment
BCSL 058 solved assignmentBCSL 058 solved assignment
C programming BY Mazedur
C programming BY MazedurC programming BY Mazedur
C programming BY Mazedur
Mazedurr rahman
 
Struct examples
Struct examplesStruct examples
Struct examples
mondalakash2012
 
7 functions
7  functions7  functions
7 functions
MomenMostafa
 
Pnno
PnnoPnno
Computer graphics lab assignment
Computer graphics lab assignmentComputer graphics lab assignment
Computer graphics lab assignment
Abdullah Al Shiam
 
Pointer basics
Pointer basicsPointer basics
Pointer basics
Mohammed Sikander
 
Pushover analysis force analogy method with force control based on euler bern...
Pushover analysis force analogy method with force control based on euler bern...Pushover analysis force analogy method with force control based on euler bern...
Pushover analysis force analogy method with force control based on euler bern...
Salar Delavar Qashqai
 

Similar to Critical buckling load geometric nonlinearity analysis of springs with rigid element displacement control large deformation formulated in c programming (20)

week-5x
week-5xweek-5x
week-5x
 
week-3x
week-3xweek-3x
week-3x
 
'C' language notes (a.p)
'C' language notes (a.p)'C' language notes (a.p)
'C' language notes (a.p)
 
Data Structure using C
Data Structure using CData Structure using C
Data Structure using C
 
C lab programs
C lab programsC lab programs
C lab programs
 
C lab programs
C lab programsC lab programs
C lab programs
 
C Programming lab
C Programming labC Programming lab
C Programming lab
 
C Programming Example
C Programming Example C Programming Example
C Programming Example
 
Basic c programs updated on 31.8.2020
Basic c programs updated on 31.8.2020Basic c programs updated on 31.8.2020
Basic c programs updated on 31.8.2020
 
DataStructures notes
DataStructures notesDataStructures notes
DataStructures notes
 
The solution manual of c by robin
The solution manual of c by robinThe solution manual of c by robin
The solution manual of c by robin
 
Chapter 8 c solution
Chapter 8 c solutionChapter 8 c solution
Chapter 8 c solution
 
BCSL 058 solved assignment
BCSL 058 solved assignmentBCSL 058 solved assignment
BCSL 058 solved assignment
 
C programming BY Mazedur
C programming BY MazedurC programming BY Mazedur
C programming BY Mazedur
 
Struct examples
Struct examplesStruct examples
Struct examples
 
7 functions
7  functions7  functions
7 functions
 
Pnno
PnnoPnno
Pnno
 
Computer graphics lab assignment
Computer graphics lab assignmentComputer graphics lab assignment
Computer graphics lab assignment
 
Pointer basics
Pointer basicsPointer basics
Pointer basics
 
Pushover analysis force analogy method with force control based on euler bern...
Pushover analysis force analogy method with force control based on euler bern...Pushover analysis force analogy method with force control based on euler bern...
Pushover analysis force analogy method with force control based on euler bern...
 

More from Salar Delavar Qashqai

Pushover 2order (p delta effect) analysis force analogy method with force con...
Pushover 2order (p delta effect) analysis force analogy method with force con...Pushover 2order (p delta effect) analysis force analogy method with force con...
Pushover 2order (p delta effect) analysis force analogy method with force con...
Salar Delavar Qashqai
 
Pushover analysis of frame by force analogy method with force control based o...
Pushover analysis of frame by force analogy method with force control based o...Pushover analysis of frame by force analogy method with force control based o...
Pushover analysis of frame by force analogy method with force control based o...
Salar Delavar Qashqai
 
Truss optimization with excel solver
Truss optimization with excel solverTruss optimization with excel solver
Truss optimization with excel solver
Salar Delavar Qashqai
 
Pushover analysis of triangular steel membrane element subjected to lateral d...
Pushover analysis of triangular steel membrane element subjected to lateral d...Pushover analysis of triangular steel membrane element subjected to lateral d...
Pushover analysis of triangular steel membrane element subjected to lateral d...
Salar Delavar Qashqai
 
Pushover analysis of simply support steel section beam based on plastic hinge...
Pushover analysis of simply support steel section beam based on plastic hinge...Pushover analysis of simply support steel section beam based on plastic hinge...
Pushover analysis of simply support steel section beam based on plastic hinge...
Salar Delavar Qashqai
 
Pushover analysis of steel section beam subjected to incremental vertical loa...
Pushover analysis of steel section beam subjected to incremental vertical loa...Pushover analysis of steel section beam subjected to incremental vertical loa...
Pushover analysis of steel section beam subjected to incremental vertical loa...
Salar Delavar Qashqai
 
Moment curvature analysis of unconfined concrete section with matlab and sap2000
Moment curvature analysis of unconfined concrete section with matlab and sap2000Moment curvature analysis of unconfined concrete section with matlab and sap2000
Moment curvature analysis of unconfined concrete section with matlab and sap2000
Salar Delavar Qashqai
 
Large deformation analysis of cantilever beam subjected to concentrated const...
Large deformation analysis of cantilever beam subjected to concentrated const...Large deformation analysis of cantilever beam subjected to concentrated const...
Large deformation analysis of cantilever beam subjected to concentrated const...
Salar Delavar Qashqai
 
Moment curvature analysis unconfined concrete section with different tension...
Moment curvature analysis unconfined concrete section  with different tension...Moment curvature analysis unconfined concrete section  with different tension...
Moment curvature analysis unconfined concrete section with different tension...
Salar Delavar Qashqai
 
Optimization of steel section based on moment and section ductility
Optimization of steel section based on moment and section ductilityOptimization of steel section based on moment and section ductility
Optimization of steel section based on moment and section ductility
Salar Delavar Qashqai
 
Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...
Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...
Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...
Salar Delavar Qashqai
 
Import data from csv excel file and export to xml excel file in c programming
Import data from csv excel file and export to xml excel file in c programmingImport data from csv excel file and export to xml excel file in c programming
Import data from csv excel file and export to xml excel file in c programming
Salar Delavar Qashqai
 
Elastic response pseudo spectrum in c programming
Elastic response pseudo spectrum in c programmingElastic response pseudo spectrum in c programming
Elastic response pseudo spectrum in c programming
Salar Delavar Qashqai
 
Structural eigen value analysis in c programming
Structural eigen value analysis in c programmingStructural eigen value analysis in c programming
Structural eigen value analysis in c programming
Salar Delavar Qashqai
 
Pushover analysis force analogy method with force control based on timoshenko...
Pushover analysis force analogy method with force control based on timoshenko...Pushover analysis force analogy method with force control based on timoshenko...
Pushover analysis force analogy method with force control based on timoshenko...
Salar Delavar Qashqai
 
Analysis of 1st order and 2nd order nonlinear semi rigid connection braced fr...
Analysis of 1st order and 2nd order nonlinear semi rigid connection braced fr...Analysis of 1st order and 2nd order nonlinear semi rigid connection braced fr...
Analysis of 1st order and 2nd order nonlinear semi rigid connection braced fr...
Salar Delavar Qashqai
 
Analysis of 1st order and 2nd order nonlinear semi rigid connection frame sub...
Analysis of 1st order and 2nd order nonlinear semi rigid connection frame sub...Analysis of 1st order and 2nd order nonlinear semi rigid connection frame sub...
Analysis of 1st order and 2nd order nonlinear semi rigid connection frame sub...
Salar Delavar Qashqai
 
Moment curvature analysis confined concrete section in matlab
Moment curvature analysis confined concrete section in matlabMoment curvature analysis confined concrete section in matlab
Moment curvature analysis confined concrete section in matlab
Salar Delavar Qashqai
 
Moment curvature analysis of unconfined circular concrete pipe section with m...
Moment curvature analysis of unconfined circular concrete pipe section with m...Moment curvature analysis of unconfined circular concrete pipe section with m...
Moment curvature analysis of unconfined circular concrete pipe section with m...
Salar Delavar Qashqai
 
1st order pushover analysis of column subjected to compression and tension ax...
1st order pushover analysis of column subjected to compression and tension ax...1st order pushover analysis of column subjected to compression and tension ax...
1st order pushover analysis of column subjected to compression and tension ax...
Salar Delavar Qashqai
 

More from Salar Delavar Qashqai (20)

Pushover 2order (p delta effect) analysis force analogy method with force con...
Pushover 2order (p delta effect) analysis force analogy method with force con...Pushover 2order (p delta effect) analysis force analogy method with force con...
Pushover 2order (p delta effect) analysis force analogy method with force con...
 
Pushover analysis of frame by force analogy method with force control based o...
Pushover analysis of frame by force analogy method with force control based o...Pushover analysis of frame by force analogy method with force control based o...
Pushover analysis of frame by force analogy method with force control based o...
 
Truss optimization with excel solver
Truss optimization with excel solverTruss optimization with excel solver
Truss optimization with excel solver
 
Pushover analysis of triangular steel membrane element subjected to lateral d...
Pushover analysis of triangular steel membrane element subjected to lateral d...Pushover analysis of triangular steel membrane element subjected to lateral d...
Pushover analysis of triangular steel membrane element subjected to lateral d...
 
Pushover analysis of simply support steel section beam based on plastic hinge...
Pushover analysis of simply support steel section beam based on plastic hinge...Pushover analysis of simply support steel section beam based on plastic hinge...
Pushover analysis of simply support steel section beam based on plastic hinge...
 
Pushover analysis of steel section beam subjected to incremental vertical loa...
Pushover analysis of steel section beam subjected to incremental vertical loa...Pushover analysis of steel section beam subjected to incremental vertical loa...
Pushover analysis of steel section beam subjected to incremental vertical loa...
 
Moment curvature analysis of unconfined concrete section with matlab and sap2000
Moment curvature analysis of unconfined concrete section with matlab and sap2000Moment curvature analysis of unconfined concrete section with matlab and sap2000
Moment curvature analysis of unconfined concrete section with matlab and sap2000
 
Large deformation analysis of cantilever beam subjected to concentrated const...
Large deformation analysis of cantilever beam subjected to concentrated const...Large deformation analysis of cantilever beam subjected to concentrated const...
Large deformation analysis of cantilever beam subjected to concentrated const...
 
Moment curvature analysis unconfined concrete section with different tension...
Moment curvature analysis unconfined concrete section  with different tension...Moment curvature analysis unconfined concrete section  with different tension...
Moment curvature analysis unconfined concrete section with different tension...
 
Optimization of steel section based on moment and section ductility
Optimization of steel section based on moment and section ductilityOptimization of steel section based on moment and section ductility
Optimization of steel section based on moment and section ductility
 
Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...
Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...
Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...
 
Import data from csv excel file and export to xml excel file in c programming
Import data from csv excel file and export to xml excel file in c programmingImport data from csv excel file and export to xml excel file in c programming
Import data from csv excel file and export to xml excel file in c programming
 
Elastic response pseudo spectrum in c programming
Elastic response pseudo spectrum in c programmingElastic response pseudo spectrum in c programming
Elastic response pseudo spectrum in c programming
 
Structural eigen value analysis in c programming
Structural eigen value analysis in c programmingStructural eigen value analysis in c programming
Structural eigen value analysis in c programming
 
Pushover analysis force analogy method with force control based on timoshenko...
Pushover analysis force analogy method with force control based on timoshenko...Pushover analysis force analogy method with force control based on timoshenko...
Pushover analysis force analogy method with force control based on timoshenko...
 
Analysis of 1st order and 2nd order nonlinear semi rigid connection braced fr...
Analysis of 1st order and 2nd order nonlinear semi rigid connection braced fr...Analysis of 1st order and 2nd order nonlinear semi rigid connection braced fr...
Analysis of 1st order and 2nd order nonlinear semi rigid connection braced fr...
 
Analysis of 1st order and 2nd order nonlinear semi rigid connection frame sub...
Analysis of 1st order and 2nd order nonlinear semi rigid connection frame sub...Analysis of 1st order and 2nd order nonlinear semi rigid connection frame sub...
Analysis of 1st order and 2nd order nonlinear semi rigid connection frame sub...
 
Moment curvature analysis confined concrete section in matlab
Moment curvature analysis confined concrete section in matlabMoment curvature analysis confined concrete section in matlab
Moment curvature analysis confined concrete section in matlab
 
Moment curvature analysis of unconfined circular concrete pipe section with m...
Moment curvature analysis of unconfined circular concrete pipe section with m...Moment curvature analysis of unconfined circular concrete pipe section with m...
Moment curvature analysis of unconfined circular concrete pipe section with m...
 
1st order pushover analysis of column subjected to compression and tension ax...
1st order pushover analysis of column subjected to compression and tension ax...1st order pushover analysis of column subjected to compression and tension ax...
1st order pushover analysis of column subjected to compression and tension ax...
 

Recently uploaded

BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
zubairahmad848137
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
NazakatAliKhoso2
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 

Recently uploaded (20)

BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 

Critical buckling load geometric nonlinearity analysis of springs with rigid element displacement control large deformation formulated in c programming

  • 1. >> IN THE NAME OF GOD < Critical Buckling Load Geometric Nonlinearity Analysis of Springs with Rigid Element Displacement Control Large Deformation Formulated in C programming C program is written by Salar Delavar Qashqai – Publication Date: 08/April/2021 E-mail: salar.d.ghashghaei@gmail.com
  • 2. C Code: #include <stdio.h> #include <windows.h> // text color #include <conio.h> #define N 10000 #define ShowText01 "RigidElementSpringDCStrainGNPcr-inputDATA.csv" #define ShowText02 "RigidElementSpringDCStrainGNPcr-outputEXCEL.csv" #define ShowText03 "RigidElementSpringDCStrainGNPcr-outputMATLAB.m" #define ShowText04 "Graph-outputHTML.html" void IMPORT_DATA01(double Import_Data[]); void MessageNegative_IMPORT_DATA01(double Import_Data[]); void MessageInputDataTEXT(); void MessageAnalysisReportTEXT(); void MessageErrorReportTEXT(); void MessageInitialData(double Import_Data[],int n); void MessageStarinStressTEXT(double STARIN01[],double STRESS01[],double STARIN02[],double STRESS02[],int n); void textcolor(int ForgC); void Distance(int i); void ANALYSIS(double Import_Data[],int n,int m); double ABS(double B); double Horizental_Disp(double L,double &x,double y); double SQRT2(double D); double MAX_ABS(double A[],int n); void OUTPUT_excel(double A[],double B[],double C[],int n); void OUTPUT_HTML_GRAPH(double X[],double Y[],int n,const char text1[],const char text2[],const char text3[]); int main(){ int k; double Import_Data[13]; IMPORT_DATA01(Import_Data); MessageNegative_IMPORT_DATA01(Import_Data); int m = 1 + ABS(Import_Data[12]/Import_Data[10]); textcolor(10); MessageInitialData(Import_Data,m); textcolor(14); ANALYSIS(Import_Data,k,m); getch(); return 0; } void IMPORT_DATA01(double Import_Data[]){ int i=0; FILE *InputFile; InputFile = fopen(ShowText01, "r"); if (!InputFile){ MessageErrorReportTEXT(); printf(" File is not available! -> [%s] n",ShowText01); Sleep(6000); exit(1); } char line[100],a[100]; while(i < N && fgets(line,sizeof(line),InputFile) != NULL){ sscanf(line,"%s",a); //printf("a[%d]: %sn",i,a); Import_Data[i]= atof(a); i++; } } void MessageNegative_IMPORT_DATA01(double Import_Data[]){ if ( Import_Data[0] < 0 || Import_Data[1] < 0 || Import_Data[2] < 0 || Import_Data[3] < 0 || Import_Data[4] < 0 || Import_Data[5] < 0 || Import_Data[10] < 0|| Import_Data[12] < 0){ MessageErrorReportTEXT(); printf(" Please check this file! -> [%s]n",ShowText01); printf(" *** Negative data input value is not acceptable ***n"); printf(" Rotational Spring Stiffness: %fn",Import_Data[0]); printf(" Length of rigid element: %fn",Import_Data[1]); printf(" Spring length 1: %fn",Import_Data[2]); printf(" Spring length 2: %fn",Import_Data[3]); printf(" Spring area 1: %fn",Import_Data[4]); printf(" Spring area 2: %fn",Import_Data[5]); printf(" Spring modulus of elasticity 1: %fn",Import_Data[6]); printf(" Spring modulus of elasticity 2: %fn",Import_Data[7]); printf(" External applied load in spring 1: %fn",Import_Data[8]); printf(" External applied load in spring 2: %fn",Import_Data[9]); printf(" Initial applied displacement: %fn",Import_Data[10]); printf(" Distance of spring 1 from rigid element: %fn",Import_Data[11]); printf(" Ultimate absolute displacement: %fn",Import_Data[12]); Sleep(40000); exit(1); } } void textcolor(int ForgC){ WORD wColor; //This handle is needed to get the current background attribute HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_SCREEN_BUFFER_INFO csbi; //csbi is used for wAttributes word if(GetConsoleScreenBufferInfo(hStdOut, &csbi)){ //To mask out all but the background attribute, and to add the color wColor = (csbi.wAttributes & 0xF0) + (ForgC & 0x0F); SetConsoleTextAttribute(hStdOut, wColor); } return; } void MessageErrorReportTEXT(){ int i;
  • 3. char Ql; Ql=176; textcolor(12); printf("an "); for (i=1;i<50;i++) printf("%c",Ql); printf(" Error Report "); for (i=1;i<50;i++) printf("%c",Ql); printf("n"); } void MessageInputDataTEXT(){ int i; char Ql=176; printf("n "); for (i=1;i<50;i++) printf("%c",Ql); printf(" Input Data "); for (i=1;i<50;i++) printf("%c",Ql); printf("n"); } void MessageAnalysisReportTEXT(){ int i; char Ql=176; printf("n "); for (i=1;i<47;i++) printf("%c",Ql); printf(" Analysis Report "); for (i=1;i<47;i++) printf("%c",Ql); printf("n"); printf("nt "); for (i=1;i<98;i++) printf("-"); printf("n"); printf("t Increment Base Shear Incremental Displacement[DOF(1)] Critical Pressure Load n"); printf("t "); for (i=1;i<98;i++) printf("-"); printf("n"); } void Distance(int i){ if (i < 10) printf("b"); if (i >= 10 && i <= 99) printf("btb"); if (i >= 100 && i <= 999) printf("btbb"); if (i >= 1000 && i <= 9999) printf("btbbb"); if (i >= 10000 && i <= 20000) printf("btbbbb"); } double ABS(double B){ if (B < 0) B = -B;//Absolute number else B = B; return B; } void ANALYSIS(double Import_Data[],int n,int m){ double L,Dx,a=0,Le[2],Area[2],Elas[2],Force[2],K[2],Dini,Dmax,Du,up,K_rotation; int z,well_done=0; double output_u[N],output_Pcr[N],output_base[N]; K_rotation = Import_Data[0]; L = Import_Data[1]; Le[0] = Import_Data[2]; Le[1] = Import_Data[3]; Area[0] = Import_Data[4]; Area[1] = Import_Data[5]; Elas[0] = Import_Data[6]; Elas[1] = Import_Data[7]; Force[0] = Import_Data[8]; Force[1] = Import_Data[9]; Dini = Import_Data[10]; Du = Import_Data[11]; Dmax = Import_Data[12]; double F[2],LE[2]; MessageAnalysisReportTEXT(); for (z=0;z<m;z++){ up = Dini*(z+1);// Define the applied Displacement Horizental_Disp(L,Dx,up); LE[0] = SQRT2((Le[0]+.5*up)*(Le[0]+.5*up)+Dx*Dx); K[0] = Elas[0]*Area[0]/LE[0]; F[0] = (((Le[0]+.5*up)/LE[0])*((Le[0]+.5*up)/LE[0]))*K[0]*0.5*up + Import_Data[8]; LE[1] = SQRT2((Le[1]-up)*(Le[1]-up) + Dx*Dx); K[1] = Elas[1]*Area[1]/LE[1]; F[1] = (((Le[1]-up)/LE[1])*((Le[1]-up)/LE[1]))*K[1]*up + Import_Data[9]; output_u[z] = up; output_Pcr[z] = (-Import_Data[8]*((.5*L*L)/(L-Dx))-Import_Data[9]*((L*L)/(L-Dx))+F[0]*((.5*L*L)/(L-Dx))+F[1]*((L*L)/(L-Dx))+K_rotation*(up/(L-Dx)))/up;//up/(L-Dx) output_base[z] = F[0] + F[1]; Distance(z); printf("tt%dtt%ett%ettt%en",z+1,output_base[z],output_u[z],output_Pcr[z]); if (ABS(up) >= Dmax){ well_done = 1; textcolor(13); printf("ntt Increment displacement reach to ultimate displacementnn"); break;
  • 4. } }// for if (well_done == 1){ OUTPUT_excel(output_u,output_Pcr,output_base,z); OUTPUT_HTML_GRAPH(output_u,output_Pcr,z+1,"Displacement - Critical Buckling Load Graph","Displacement","Critical Buckling Load"); textcolor(15); printf("na - Output data is written in Excel file -"); system("start /w Graph-outputHTML.html"); } } void OUTPUT_excel(double A[],double B[],double C[],int n){ // EXCEL OUTPUT int i; FILE *OutputFile; OutputFile = fopen(ShowText02, "w"); fprintf(OutputFile," ### Critical Pressure Load Geometric Nonlinearity Analysis of Springs with Displacement Control Large Deformation Formulated ###n"); fprintf(OutputFile,"Increment,Displacement [DOF(1)],Critical Pressure Load,Base Shearn"); for(i=0;i<n;i++) fprintf(OutputFile,"%d,%e,%e,%en",i+1,A[i],B[i],C[i]); fclose(OutputFile); } void MessageInitialData(double Import_Data[],int n){ char Qa,Qb,Qc,Qd,Qe,Qf,Qg,Qk; int i; Qa=201;Qb=205;Qc=187;Qd=200;Qe=188,Qf=186,Qg=204,Qk=185; printf("tttt%c",Qa); for (i=1;i<71;i++) printf("%c",Qb); printf("%cn",Qc); printf("tttt%c >> IN THE NAME OF GOD << %cn",Qf,Qf); printf("tttt%c Critical Pressure Load Geometric Nonlinearity Analysis of Springs %cn",Qf,Qf); printf("tttt%c with Displacement Control Large Deformation Formulated %cn",Qf,Qf); printf("tttt%c UNIT: Free Unit %cn",Qf,Qf); printf("tttt%c",Qg); for (i=1;i<71;i++) printf("%c",Qb); printf("%cn",Qk); printf("tttt%c This program is written by Salar Delavar Ghashghaei %cn",Qf,Qf); printf("tttt%c E-mail: salar.d.ghashghaei@gmail.com %cn",Qf,Qf); printf("tttt%c",Qd); for (i=1;i<71;i++) printf("%c",Qb); printf("%cn",Qe); MessageInputDataTEXT(); printf("t Rotational Spring Stiffness: %fn",Import_Data[0]); printf("t Length of rigid element: %fn",Import_Data[1]); printf("t Spring length 1: %fn",Import_Data[2]); printf("t Spring length 2: %fn",Import_Data[3]); printf("t Spring area 1: %fn",Import_Data[4]); printf("t Spring area 2: %fn",Import_Data[5]); printf("t Spring modulus of elasticity 1: %fn",Import_Data[6]); printf("t Spring modulus of elasticity 2: %fn",Import_Data[7]); printf("t External applied load in spring 1: %fn",Import_Data[8]); printf("t External applied load in spring 2: %fn",Import_Data[9]); printf("t Initial applied displacement: %fn",Import_Data[10]); printf("t Distance of spring 1 from rigid element: %fn",Import_Data[11]); printf("t Ultimate absolute displacement: %fn",Import_Data[12]); printf("t Number of increments: %dn",n); } double Horizental_Disp(double L,double &x,double y){ int it,itermax; double residual,tolerance,dx,dx_ABS,f,df; it = 0; // initialize iteration count itermax = 100000; residual = 100; // initialize residual tolerance = 1e-12; x = 1;// initialize answer while (residual > tolerance){ f = x*x + y*y - 2*L*x; df = 2*x - 2*L; dx = f/df; x -= dx; residual = ABS(dx); // abs residual it = it + 1; // increment iteration count //printf("f: %f -tdx: %f -tresidual: %fn",f,dx,residual); if (it == itermax){ printf("tSQRT2(number,power) : SQRT2(%f) - iteration: %d -> ## The solution is not converged ##n",y,it); break; } } if (it < itermax){ //printf("tSQRT(number,power) - SQRT(%f,%f) : %f n",D,n, x); return x; } } double SQRT2(double D){ int it,itermax; double residual,tolerance,x,dx,dx_ABS,f,df; it = 0; // initialize iteration count itermax = 100000; residual = 100; // initialize residual tolerance = 1e-8; x = 1;// initialize answer while (residual > tolerance){ f = x*x - D; df = 2 * x; dx = f/df; x= x - dx;
  • 5. residual = ABS(dx); // abs residual it = it + 1; // increment iteration count //printf("f: %f -tdx: %f -tresidual: %fn",f,dx,residual); if (it == itermax){ printf("tSQRT2(number,power) : SQRT2(%f) - iteration: %d -> ## The solution is not converged ##n",D,it); break; } } if (it < itermax){ //printf("tSQRT(number,power) - SQRT(%f,%f) : %f n",D,n, x); return x; } } void OUTPUT_HTML_GRAPH(double X[],double Y[],int n,const char text1[],const char text2[],const char text3[]){ // HTML GRAPH OUTPUT int i; double x,y,NorX[N],NorY[N],Xmax,Ymax; Xmax=MAX_ABS(X,n); Ymax=MAX_ABS(Y,n); for (i=0;i<n;i++){ NorX[i] = X[i]/Xmax; NorY[i] = Y[i]/Ymax; //printf("t %f %f n",NorX[i],NorY[i]); } FILE *OutputFile; OutputFile = fopen(ShowText04, "w"); fprintf(OutputFile,"<!DOCTYPE HTML><html><body style="background-color:black;"><font color="white"><head><script> n"); fprintf(OutputFile,"window.onload = function(){ n"); fprintf(OutputFile,"var canvas = document.getElementById("myCanvas");var s1 = canvas.getContext("2d");var s2 = canvas.getContext('2d'); n"); fprintf(OutputFile,"var s3 = canvas.getContext("2d");var s4 = canvas.getContext("2d");var s5 = canvas.getContext("2d"); n"); fprintf(OutputFile,"var x=120,y=100,X,Y,Lx=1100,Ly=500,i; n"); fprintf(OutputFile,"s3.beginPath();s3.lineWidth = 3;s3.strokeStyle = "cyan";s3.rect(x,y,Lx,Ly); n"); fprintf(OutputFile,"for(i=0;i<9;i++){s3.moveTo(x+Lx*(i+1)*.1,y+Ly);s3.lineTo(x+Lx*(i+1)*.1,y+Ly-10);}; n"); fprintf(OutputFile,"for(i=0;i<9;i++){s3.moveTo(x,y+Ly*(i+1)*.1);s3.lineTo(x+10,y+Ly*(i+1)*.1);};s3.stroke();n"); fprintf(OutputFile,"s1.beginPath();s1.lineWidth = 3;s1.strokeStyle = "yellow"; n"); for (i=0;i<n-1;i++){ fprintf(OutputFile,"s1.moveTo(%f,%f); n",120+NorX[i]*1100,100+500-NorY[i]*500); fprintf(OutputFile,"s1.lineTo(%f,%f); n",120+NorX[i+1]*1100,100+500-NorY[i+1]*500); } fprintf(OutputFile,"s1.stroke(); n"); fprintf(OutputFile,"s2.beginPath();s2.lineWidth = 1;s2.strokeStyle = "cyan";s2.setLineDash([5, 5]); n"); fprintf(OutputFile,"for(i=0;i<19;i++){s2.moveTo(x+Lx*(i+1)*.05,y);s2.lineTo(x+Lx*(i+1)*.05,y+Ly);} n"); fprintf(OutputFile,"s2.lineWidth = 1;s2.strokeStyle = "cyan";for(i=0;i<19;i++){s2.moveTo(x,y+Ly*(i+1)*.05);s2.lineTo(x+Lx,y+Ly*(i+1)*.05);} s2.stroke();n"); fprintf(OutputFile,"X=x+.25*Lx;Y=.7*y;s4.translate(X,Y);s4.font="30px serif";s4.fillStyle = "#7fff00";s4.fillText("%s",0,0); n",text1); fprintf(OutputFile,"s4.save();X=-X+.2*x;Y=-Y+y+.6*Ly;s4.translate(X,Y);s4.rotate(3*Math.PI/2);s4.font="15px serif"; n"); fprintf(OutputFile,"s4.fillStyle = "#7fff00";s4.textAlign = "left";s4.fillText("%s",0,0);s4.restore(); n",text3); fprintf(OutputFile,"s4.save();X=.2*Lx;Y=y+Ly-20;s4.translate(X,Y);s4.rotate(2*Math.PI);s4.font="15px serif";s4.fillStyle = "#7fff00"; n"); fprintf(OutputFile,"s4.textAlign = "left";s4.fillText("%s",0,0);s4.restore(); n",text2); for(i=0;i<10;i++){ x=.1*(i+1)*Xmax; fprintf(OutputFile,"s5.save();X=-.29*Lx+Lx*(%d+1)*.1;Y=.3*y+Ly+20;s5.rotate(2*Math.PI);s5.font="16px serif"; n",i); fprintf(OutputFile,"s5.fillStyle = "#7fff00";s5.textAlign = "left";s5.fillText("%.3e",X,Y);s5.restore(); n",x); } for(i=0;i<10;i++){ y=.1*(i+1)*Ymax; fprintf(OutputFile,"s5.save();X=-.28*Lx-50;Y=Ly+.3*y-Ly*(%d+1)*.1;s5.rotate(2*Math.PI);s5.font="16px serif"; n",i); fprintf(OutputFile,"s5.fillStyle = "#7fff00";s5.textAlign = "left";s5.fillText("%.3e",X,Y);s5.restore(); n",y); } fprintf(OutputFile,"s5.save();X=-.25*Lx;Y=.3*y+Ly+20;s5.rotate(2*Math.PI);s5.font="16px serif";s5.fillStyle = "#7fff00";s5.fillText(0,X,Y);s5.restore(); n"); fprintf(OutputFile,"s5.save();X=-.25*Lx-50;Y=Ly+.3*y;s5.rotate(2*Math.PI);s5.font="16px serif";s5.fillStyle = "#7fff00";s5.textAlign = "left";s5.fillText(0,X,Y);s5.restore();}; n"); fprintf(OutputFile,"</script></head><body><canvas id="myCanvas" width="1300" height="1300" style="border:1px solid black;"></canvas></body></html> n"); fclose(OutputFile); } double MAX_ABS(double A[],int n){ int i; double B[N]; double Amax; // abs value for (i=0;i<n;i++){ B[i] = A[i]; if(B[i] < 0) B[i] = -B[i]; } // Max of abs Amax = B[0]; for (i=1;i<n;i++){ if(Amax < B[i]) Amax = B[i]; } return Amax; }