Critical buckling load geometric nonlinearity analysis of springs with rigid element displacement control large deformation formulated in c programming
This C program performs a geometric nonlinearity analysis of springs with rigid elements under displacement-controlled large deformations. It imports input data, performs an incremental analysis to calculate critical buckling loads, and exports output to Excel and HTML files. The analysis calculates forces, displacements, and critical pressures at each increment until the ultimate displacement is reached. Output graphs the displacement versus critical pressure relationship.
Critical buckling load geometric nonlinearity analysis of springs with rigid ...Salar Delavar Qashqai
This C program performs a geometric nonlinearity analysis of springs with rigid elements under displacement-controlled large deformations. It imports input data, analyzes the system over multiple increments of applied displacement, and outputs the results to Excel and HTML files. The analysis calculates forces, displacements, base shear, and critical buckling load at each increment. When the ultimate displacement is reached, the program terminates and displays completion messages.
Geometric nonlinearity analysis of springs with rigid element displacement co...Salar Delavar Qashqai
This document contains the code for analyzing the geometric and material nonlinearity of springs under displacement-controlled loading. The code imports input data on spring properties and stress-strain behavior, performs an incremental analysis to calculate the base shear and displacement at each step, and exports the results to Excel and MATLAB files. Negative or invalid input values trigger error messages. The analysis calculates the strain, stiffness, and force in each spring at each increment until the ultimate displacement is reached.
Nonlinear analysis of braced frame with hinge by hinge method in c programmingSalar Delavar Qashqai
This document is a C program code for nonlinear analysis of braced frames with hinge elements using the hinge method. The program imports input data, calculates the global stiffness matrix and its inverse, determines member forces and displacements through matrix operations, and outputs results to Excel files. Key steps include importing geometry, material properties, and loading, calculating element and system stiffness matrices, inverting the system matrix, determining member forces and displacements, and reporting results.
Geometric and material nonlinearity analysis of 2 d truss with force and duct...Salar Delavar Qashqai
This document describes a C program written by Salar Delavar Qashqai to analyze the geometric and material nonlinearity of a 2D truss structure under force and ductility damage index control. The program imports input data files, performs a pushover analysis using incremental loading, calculates member forces and displacements, and exports output to text, Excel, MATLAB, and HTML files. Key sections of code are presented to demonstrate how the program assembles and solves the system stiffness matrix, calculates element forces and stiffness, and checks for convergence at each iteration.
Geometric and material nonlinearity analysis of 2 d truss with force control ...Salar Delavar Qashqai
This document describes a C++ program for analyzing the geometric and material nonlinearity of a 2D truss structure under force control and ductility damage index control. The program performs a pushover analysis of the truss by applying incremental lateral forces and calculating the member forces, displacements, and base shear at each step. The program results are verified against the structural analysis programs SEISMOSTRUCT and ABAQUS. Key aspects of the program include importing input data files, assembling the structure stiffness matrix, calculating displacements and internal forces through an iterative solution, and exporting the results to text, Excel, MATLAB, and HTML files.
The document contains 10 programs related to sorting and graph algorithms. Program 1-7 implement different sorting algorithms - insertion sort, selection sort, heap sort, quick sort, counting sort, merge sort and radix sort. Program 8 implements the greedy knapsack problem. Program 9 implements the travelling salesman problem. Program 10 implements Kruskal's algorithm to find the minimum spanning tree of a graph.
design and analysis of algorithm Lab filesNitesh Dubey
This document contains details of experiments conducted as part of a "Design and Analysis of Algorithm Lab" course. It includes 10 experiments covering algorithms like binary search, heap sort, merge sort, selection sort, insertion sort, quick sort, knapsack problem, travelling salesman problem, minimum spanning tree (using Kruskal's algorithm), and N queen problem (using backtracking). For each experiment, it provides the objective, program code implementation, and result. The document is submitted by a student to their professor for the lab session.
This document contains C program code examples for various programming problems. It is divided into 5 weeks. Some of the programs included are: exchanging values between two variables with and without a temporary variable, finding the sum of digits of a positive integer, generating factors of numbers, calculating the factorial of a number, computing the sine function as a series, generating the Fibonacci sequence, reversing digits of an integer, converting decimal to binary, octal and hexadecimal, calculating terms of a series, and performing basic mathematical operations based on user input. The document provides the code and output for each problem.
Critical buckling load geometric nonlinearity analysis of springs with rigid ...Salar Delavar Qashqai
This C program performs a geometric nonlinearity analysis of springs with rigid elements under displacement-controlled large deformations. It imports input data, analyzes the system over multiple increments of applied displacement, and outputs the results to Excel and HTML files. The analysis calculates forces, displacements, base shear, and critical buckling load at each increment. When the ultimate displacement is reached, the program terminates and displays completion messages.
Geometric nonlinearity analysis of springs with rigid element displacement co...Salar Delavar Qashqai
This document contains the code for analyzing the geometric and material nonlinearity of springs under displacement-controlled loading. The code imports input data on spring properties and stress-strain behavior, performs an incremental analysis to calculate the base shear and displacement at each step, and exports the results to Excel and MATLAB files. Negative or invalid input values trigger error messages. The analysis calculates the strain, stiffness, and force in each spring at each increment until the ultimate displacement is reached.
Nonlinear analysis of braced frame with hinge by hinge method in c programmingSalar Delavar Qashqai
This document is a C program code for nonlinear analysis of braced frames with hinge elements using the hinge method. The program imports input data, calculates the global stiffness matrix and its inverse, determines member forces and displacements through matrix operations, and outputs results to Excel files. Key steps include importing geometry, material properties, and loading, calculating element and system stiffness matrices, inverting the system matrix, determining member forces and displacements, and reporting results.
Geometric and material nonlinearity analysis of 2 d truss with force and duct...Salar Delavar Qashqai
This document describes a C program written by Salar Delavar Qashqai to analyze the geometric and material nonlinearity of a 2D truss structure under force and ductility damage index control. The program imports input data files, performs a pushover analysis using incremental loading, calculates member forces and displacements, and exports output to text, Excel, MATLAB, and HTML files. Key sections of code are presented to demonstrate how the program assembles and solves the system stiffness matrix, calculates element forces and stiffness, and checks for convergence at each iteration.
Geometric and material nonlinearity analysis of 2 d truss with force control ...Salar Delavar Qashqai
This document describes a C++ program for analyzing the geometric and material nonlinearity of a 2D truss structure under force control and ductility damage index control. The program performs a pushover analysis of the truss by applying incremental lateral forces and calculating the member forces, displacements, and base shear at each step. The program results are verified against the structural analysis programs SEISMOSTRUCT and ABAQUS. Key aspects of the program include importing input data files, assembling the structure stiffness matrix, calculating displacements and internal forces through an iterative solution, and exporting the results to text, Excel, MATLAB, and HTML files.
The document contains 10 programs related to sorting and graph algorithms. Program 1-7 implement different sorting algorithms - insertion sort, selection sort, heap sort, quick sort, counting sort, merge sort and radix sort. Program 8 implements the greedy knapsack problem. Program 9 implements the travelling salesman problem. Program 10 implements Kruskal's algorithm to find the minimum spanning tree of a graph.
design and analysis of algorithm Lab filesNitesh Dubey
This document contains details of experiments conducted as part of a "Design and Analysis of Algorithm Lab" course. It includes 10 experiments covering algorithms like binary search, heap sort, merge sort, selection sort, insertion sort, quick sort, knapsack problem, travelling salesman problem, minimum spanning tree (using Kruskal's algorithm), and N queen problem (using backtracking). For each experiment, it provides the objective, program code implementation, and result. The document is submitted by a student to their professor for the lab session.
This document contains C program code examples for various programming problems. It is divided into 5 weeks. Some of the programs included are: exchanging values between two variables with and without a temporary variable, finding the sum of digits of a positive integer, generating factors of numbers, calculating the factorial of a number, computing the sine function as a series, generating the Fibonacci sequence, reversing digits of an integer, converting decimal to binary, octal and hexadecimal, calculating terms of a series, and performing basic mathematical operations based on user input. The document provides the code and output for each problem.
The document describes a C program that implements selection sort using pointers and functions. It takes input of array size and elements, calls the selection sort function sel() on the array, and prints the sorted output. The sel() function takes the array, start and end indexes, finds the minimum element in the range and swaps it with the start element, then calls itself recursively to sort the rest.
The document contains code snippets for several C programs including:
1) A program to add complex numbers by defining a structure for complex numbers and taking user input for real and imaginary parts of two numbers and printing their sum.
2) A binary search algorithm implementation to search a sorted array for a key and return its index.
3) A bubble sort algorithm implementation to sort an array of long integers in ascending order by swapping adjacent elements.
The document contains C code for multiple programs that perform various calculations and operations on arrays and numbers. The programs include:
1. Evaluating mathematical expressions by taking input values, performing calculations defined by the expressions, and outputting results.
2. Performing logical operations and comparisons on input values to determine output values based on if/else or switch statements.
3. Calculating factorials, digit sums, reversing numbers, checking for palindromes, and other numeric operations using loops.
4. Generating patterns and diagrams by iterating with for loops.
5. Performing array operations like reversing elements, calculating sums, and swapping arrays.
This document contains 8 C programming code examples demonstrating various scheduling algorithms:
1. First Come First Serve scheduling
2. Non-preemptive Shortest Job First scheduling
3. Round Robin scheduling
4. Priority scheduling
5. Banker's algorithm for deadlock avoidance
6. Producer-consumer problem synchronization
7. Dekker's algorithm for mutual exclusion
Each program example includes comments explaining the algorithm and includes functions to calculate waiting times, turnaround times, and other metrics.
1. The document provides a lab manual for computer networks and operating systems labs containing 8 programs to implement various networking and security algorithms.
2. The programs include implementing data link layer framing methods, CRC polynomials, Dijkstra's shortest path algorithm, distance vector routing, DES encryption, breaking the DES code, and RSA encryption/decryption.
3. The document contains instructions for 8 programs to implement computer network and security algorithms as part of a lab course covering topics like data link layer, routing, encryption, and public key cryptography.
COMPUTER SCIENCE CLASS 12 PRACTICAL FILEAnushka Rai
Here's my Computer Science Board Practical File. I hope you find it as useful as it was to me.This file is however of CBSE class 12th 2020-2021 syllabus.
The documents contain program code snippets for various sorting and searching algorithms in C programming language including selection sort, bubble sort, quick sort, merge sort, insertion sort, binary search and linear search. The programs take input from the user, implement the respective algorithms to sort or search arrays of numbers, and output the results.
The document contains code to calculate the sum of the digits of the factorial of a given number. It initializes an array to store the digits, calculates the factorial iteratively by multiplying by numbers from 1 to the given number, stores the digits in the array, prints out the factorial and calculates the sum of its digits.
The document describes programs to implement various operations on singly linked lists including insertion, deletion, counting nodes, creating a list, traversing a list, and copying a list. It provides functions for insertion at the beginning, end, and before/after a given node. Deletion functions remove from the beginning, end, or by item value. Counting returns the total nodes or occurrences of a value. Traversal and copying print or duplicate the list.
This document contains 17 programming problems and their solutions involving object oriented programming concepts like classes, objects, functions, arrays, pointers etc. The problems cover basic concepts like calculating factorial, checking prime number, Fibonacci series, arithmetic operations using menus. More advanced concepts covered include sorting, searching, function overloading, complex numbers, class/object concepts like constructors, destructors and member functions to maintain student records.
The document contains the code for a menu driven C++ program that performs various operations on matrices such as calculating row and column sums, finding the transpose, and checking if two matrices are equal. It defines functions to perform these operations and contains a main function that inputs the matrices, displays a menu, and calls the appropriate functions based on the user's selection.
The document contains 34 code snippets showing C programming examples using arrays, loops, functions, conditional statements, and other basic programming concepts. The code snippets demonstrate how to:
1) Print messages, take user input, perform basic math operations like addition and averaging numbers
2) Check conditions like even/odd, positive/negative, leap year
3) Use different loops like while, for, do-while to iterate
4) Define and call functions to modularize code for swapping, factorial, Fibonacci series etc.
5) Use one-dimensional arrays to store and process data
Practical Class 12th (c++programs+sql queries and output) Aman Deep
Just download this and do some specific changes in the name section and roll no section . and submit it as it is to your teacher this will surely work and help you out your class 12th board practicals exam . no worries ! ENJOY :) !
The document contains code for several C++ programs that use functions to calculate factorials, sums of even and odd numbers, solutions to quadratic equations, averages, and combinations. Functions are implemented using for, while, do-while loops. Output examples are provided for sample inputs and calculations for each program.
Nonlinear analysis of fixed support beam with hinge by hinge method in c prog...Salar Delavar Qashqai
This C program performs a nonlinear analysis of a fixed support beam with hinge using the hinge method. It includes functions for importing data, generating stiffness matrices, performing matrix operations like inversion and multiplication, calculating element internal forces, and outputting results to text, MATLAB, and Excel files. The main function calls the various analysis functions and outputs initial data, analysis reports, and any error messages.
The document contains code snippets and explanations related to C programming concepts like static variables, external variables, scope of variables, const qualifier, etc. It discusses different cases of declaring variables in multiple files and explains the behavior and errors that may occur. It also contains examples demonstrating the memory segments and scope of global, local, static and extern variables.
This document contains C++ code for a railway reservation system. It defines classes for login, passenger details, reservations, cancellations, and manages the user interface and database interactions. The main function displays a menu and calls additional functions for administrative tasks like adding/viewing train schedules or passenger details, and user tasks like reservation, cancellation or inquiries. Database files store details, reservations and user login information.
This document contains programs and algorithms for simulating different CPU scheduling algorithms like FCFS, SJF, Priority and Round Robin. It also contains a program for implementing the Producer-Consumer problem using semaphores and an algorithm for implementing optimal page replacement.
Computer Science Practical Science C++ with SQL commandsVishvjeet Yadav
This document contains a practical record file for programming language C++ and database SQL presented by a student. It includes 46 topics covering various C++ programs like array operations, searching and sorting algorithms, structure implementation, stack and queue implementation using arrays and linked lists. It also covers SQL topics like creating database and tables, inserting and selecting data, using where and order by clauses, updating and deleting records. Each topic is given a page number for easy reference in the index section.
The C program uses functions to perform addition and multiplication of two matrices. It prompts the user to enter a choice between addition or multiplication. Based on the choice, it requests the rows and columns of the matrices and elements. It then defines functions to read the matrices, perform the operation, and write the output matrix.
The document contains C code to perform matrix addition and multiplication using functions. It includes functions to read and write matrices, take user input for matrix dimensions and elements, perform the operations, and output the results. The code provides a menu for the user to select addition or multiplication and handles different cases for valid and invalid inputs.
The document describes a C program that implements selection sort using pointers and functions. It takes input of array size and elements, calls the selection sort function sel() on the array, and prints the sorted output. The sel() function takes the array, start and end indexes, finds the minimum element in the range and swaps it with the start element, then calls itself recursively to sort the rest.
The document contains code snippets for several C programs including:
1) A program to add complex numbers by defining a structure for complex numbers and taking user input for real and imaginary parts of two numbers and printing their sum.
2) A binary search algorithm implementation to search a sorted array for a key and return its index.
3) A bubble sort algorithm implementation to sort an array of long integers in ascending order by swapping adjacent elements.
The document contains C code for multiple programs that perform various calculations and operations on arrays and numbers. The programs include:
1. Evaluating mathematical expressions by taking input values, performing calculations defined by the expressions, and outputting results.
2. Performing logical operations and comparisons on input values to determine output values based on if/else or switch statements.
3. Calculating factorials, digit sums, reversing numbers, checking for palindromes, and other numeric operations using loops.
4. Generating patterns and diagrams by iterating with for loops.
5. Performing array operations like reversing elements, calculating sums, and swapping arrays.
This document contains 8 C programming code examples demonstrating various scheduling algorithms:
1. First Come First Serve scheduling
2. Non-preemptive Shortest Job First scheduling
3. Round Robin scheduling
4. Priority scheduling
5. Banker's algorithm for deadlock avoidance
6. Producer-consumer problem synchronization
7. Dekker's algorithm for mutual exclusion
Each program example includes comments explaining the algorithm and includes functions to calculate waiting times, turnaround times, and other metrics.
1. The document provides a lab manual for computer networks and operating systems labs containing 8 programs to implement various networking and security algorithms.
2. The programs include implementing data link layer framing methods, CRC polynomials, Dijkstra's shortest path algorithm, distance vector routing, DES encryption, breaking the DES code, and RSA encryption/decryption.
3. The document contains instructions for 8 programs to implement computer network and security algorithms as part of a lab course covering topics like data link layer, routing, encryption, and public key cryptography.
COMPUTER SCIENCE CLASS 12 PRACTICAL FILEAnushka Rai
Here's my Computer Science Board Practical File. I hope you find it as useful as it was to me.This file is however of CBSE class 12th 2020-2021 syllabus.
The documents contain program code snippets for various sorting and searching algorithms in C programming language including selection sort, bubble sort, quick sort, merge sort, insertion sort, binary search and linear search. The programs take input from the user, implement the respective algorithms to sort or search arrays of numbers, and output the results.
The document contains code to calculate the sum of the digits of the factorial of a given number. It initializes an array to store the digits, calculates the factorial iteratively by multiplying by numbers from 1 to the given number, stores the digits in the array, prints out the factorial and calculates the sum of its digits.
The document describes programs to implement various operations on singly linked lists including insertion, deletion, counting nodes, creating a list, traversing a list, and copying a list. It provides functions for insertion at the beginning, end, and before/after a given node. Deletion functions remove from the beginning, end, or by item value. Counting returns the total nodes or occurrences of a value. Traversal and copying print or duplicate the list.
This document contains 17 programming problems and their solutions involving object oriented programming concepts like classes, objects, functions, arrays, pointers etc. The problems cover basic concepts like calculating factorial, checking prime number, Fibonacci series, arithmetic operations using menus. More advanced concepts covered include sorting, searching, function overloading, complex numbers, class/object concepts like constructors, destructors and member functions to maintain student records.
The document contains the code for a menu driven C++ program that performs various operations on matrices such as calculating row and column sums, finding the transpose, and checking if two matrices are equal. It defines functions to perform these operations and contains a main function that inputs the matrices, displays a menu, and calls the appropriate functions based on the user's selection.
The document contains 34 code snippets showing C programming examples using arrays, loops, functions, conditional statements, and other basic programming concepts. The code snippets demonstrate how to:
1) Print messages, take user input, perform basic math operations like addition and averaging numbers
2) Check conditions like even/odd, positive/negative, leap year
3) Use different loops like while, for, do-while to iterate
4) Define and call functions to modularize code for swapping, factorial, Fibonacci series etc.
5) Use one-dimensional arrays to store and process data
Practical Class 12th (c++programs+sql queries and output) Aman Deep
Just download this and do some specific changes in the name section and roll no section . and submit it as it is to your teacher this will surely work and help you out your class 12th board practicals exam . no worries ! ENJOY :) !
The document contains code for several C++ programs that use functions to calculate factorials, sums of even and odd numbers, solutions to quadratic equations, averages, and combinations. Functions are implemented using for, while, do-while loops. Output examples are provided for sample inputs and calculations for each program.
Nonlinear analysis of fixed support beam with hinge by hinge method in c prog...Salar Delavar Qashqai
This C program performs a nonlinear analysis of a fixed support beam with hinge using the hinge method. It includes functions for importing data, generating stiffness matrices, performing matrix operations like inversion and multiplication, calculating element internal forces, and outputting results to text, MATLAB, and Excel files. The main function calls the various analysis functions and outputs initial data, analysis reports, and any error messages.
The document contains code snippets and explanations related to C programming concepts like static variables, external variables, scope of variables, const qualifier, etc. It discusses different cases of declaring variables in multiple files and explains the behavior and errors that may occur. It also contains examples demonstrating the memory segments and scope of global, local, static and extern variables.
This document contains C++ code for a railway reservation system. It defines classes for login, passenger details, reservations, cancellations, and manages the user interface and database interactions. The main function displays a menu and calls additional functions for administrative tasks like adding/viewing train schedules or passenger details, and user tasks like reservation, cancellation or inquiries. Database files store details, reservations and user login information.
This document contains programs and algorithms for simulating different CPU scheduling algorithms like FCFS, SJF, Priority and Round Robin. It also contains a program for implementing the Producer-Consumer problem using semaphores and an algorithm for implementing optimal page replacement.
Computer Science Practical Science C++ with SQL commandsVishvjeet Yadav
This document contains a practical record file for programming language C++ and database SQL presented by a student. It includes 46 topics covering various C++ programs like array operations, searching and sorting algorithms, structure implementation, stack and queue implementation using arrays and linked lists. It also covers SQL topics like creating database and tables, inserting and selecting data, using where and order by clauses, updating and deleting records. Each topic is given a page number for easy reference in the index section.
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
The C program uses functions to perform addition and multiplication of two matrices. It prompts the user to enter a choice between addition or multiplication. Based on the choice, it requests the rows and columns of the matrices and elements. It then defines functions to read the matrices, perform the operation, and write the output matrix.
The document contains C code to perform matrix addition and multiplication using functions. It includes functions to read and write matrices, take user input for matrix dimensions and elements, perform the operations, and output the results. The code provides a menu for the user to select addition or multiplication and handles different cases for valid and invalid inputs.
The document discusses the C programming language. It provides a brief history of C, describes its data types and operators. It then presents 26 sample C programs demonstrating basic concepts like input/output, conditional statements, loops, functions, arrays and strings. The programs cover calculations, pattern printing, factorial, Fibonacci series and other simple programming examples.
This document contains some programs of C using Data structures, like Stack, LinkedList, queue, Fibonacci series, addition and multiplication of two matrices,etc.
This document contains C code examples for various programming concepts like functions, loops, arrays, structures, unions, file handling etc. There are a total of 30 code snippets showing how to use different data types, control structures and functions in C programming language. The code snippets range from simple Hello World program to more complex examples demonstrating concepts like recursion, structures, file handling etc.
This document contains C code examples for various programming concepts like functions, loops, arrays, structures, pointers etc. There are a total of 40 code snippets showing how to use different features in C like printing output, taking input, if-else conditions, switch case, loops (while, for, do-while), functions (call by value, call by reference), arrays (single, multi-dimensional), structures, pointers etc. Each code snippet is commented and labeled to explain the concept demonstrated in that section.
This document contains C programming code examples and exercises provided by Vikram Neerugatti, an assistant professor. It includes multiple code snippets demonstrating various programming concepts like data types, operators, control structures, functions, arrays, strings, pointers, structures and file handling. The document is divided into sections with labels like 1(A), 2(B) etc. and each section contains 1-3 code examples/exercises on different C programming topics.
This C program allows a user to answer multiple choice questions (MCQs) and checks their answers. It prints out 5 questions, each with 3 possible answers, and prompts the user to enter the number of the correct answer. It then checks each submitted answer and prints whether it is true or false. This allows the program to automatically grade a short quiz consisting of basic MCQs.
The document provides examples of basic C programs that demonstrate fundamental programming concepts like printing values, arithmetic operations, arrays, functions, conditionals, loops, and matrices. The programs cover topics such as printing and reading integers, adding/multiplying numbers, swapping values, checking vowels/consonants, Armstrong numbers, palindromes, summing matrices, and finding the transpose of a matrix.
This document contains a summary of code snippets and programs related to learning C programming. It begins by thanking several people for their support and contains quotes about programming. It then presents over a dozen short programs numbered from 1.1 to 3.16 that demonstrate basic C concepts like printing statements, mathematical operations, conditional statements, loops and functions. Each program is accompanied by a brief description and comments.
The document provides code snippets to copy the contents of one array into another array in reverse order using different approaches like loops, pointers, and functions. It also includes code to reverse an array without using additional memory by swapping elements, and to reverse an array using pointers.
The document provides instructions for solving a system of linear equations using Gaussian elimination and the Regula Falsi method. It includes sample code to implement (1) Gaussian elimination to solve the system of equations x+2y=10, 2x+y+z=9, 5x+3y+2z=23 and (2) the Regula Falsi method to find a root of the equation x^2 - 8x + 15 = 0.
The document contains code for several C programs that demonstrate different programming concepts like calculating the roots of a quadratic equation, converting between Fahrenheit and Celsius, finding the largest of three numbers, calculating the harmonic series, checking for a leap year, calculating the area of a circle, and calculating the factorial of a number. Each code sample is preceded by a brief description and followed by the output when the code is run.
The document describes exercises on structures and strings in C programming. It defines a structure called _PLAYER to store details of players like name, date of birth, height and weight. It then shows how to define the structure, read and print records of multiple players from an array of _PLAYER structures. Functions are defined to find the tallest player, print names in descending order of height, check character cases, convert case of characters in a string, and compute operations on structures like distance between points.
The document discusses functions in C programming. It provides examples of defining functions with parameters and return types, calling functions by passing arguments, using header files to declare functions, and recursion. It shows functions being defined and called to perform tasks like calculating factorials, displaying prices based on hotel rates and nights, and converting numbers to binary. Functions allow breaking programs into smaller, reusable components.
The document contains programs for various sorting and searching algorithms like insertion sort, selection sort, bubble sort, linear search, binary search, etc. It also includes programs for stack operations, queue operations, tower of Hanoi, infix to postfix conversion and postfix evaluation. Each program is written in C language and contains the main logic/code to implement the given algorithm or data structure operation.
The document contains 10 programs written in C programming language to perform various 2D and 3D graphics operations like drawing lines, rectangles, circles, ellipses, torus, scaling, rotating, shearing and reflecting objects. Program 1-5 demonstrate drawing basic shapes like line, rectangle, circle and ellipse. Program 6 draws a 3D torus using OpenGL. Program 7-9 demonstrate transformations like scaling, rotating and shearing of objects. Program 10 shows reflection of an object about x-axis, y-axis and origin.
The document discusses pointers in C programming. It provides examples of declaring and using pointers, dereferencing pointers, pointer arithmetic, passing pointers to functions, and const pointers. The examples demonstrate how to print values at addresses, increment pointers, pass pointers to functions to modify variables, and common string functions using pointers.
Pushover analysis force analogy method with force control based on euler bern...Salar Delavar Qashqai
This C program code analyzes the pushover response of semi-rigid frame connections using the force analogy method based on Euler-Bernoulli beam theory. It includes functions for importing input data, generating stiffness matrices, performing analysis calculations, and exporting output to Excel and HTML files. The program checks for valid input values and will terminate with an error if negative or unreasonable values are provided.
Similar to Critical buckling load geometric nonlinearity analysis of springs with rigid element displacement control large deformation formulated in c programming (20)
Pushover 2order (p delta effect) analysis force analogy method with force con...Salar Delavar Qashqai
This document describes a C program for pushover (P-Delta effect) analysis of structures using the force analogy method based on Timoshenko beam theory. The program analyzes plastic hinges using moment-rotation and shear-shear deformation relationships. It takes inputs from multiple CSV files, runs the analysis, and outputs results to CSV and HTML files including a base shear-displacement graph. The program was written by Salar Delavar Qashqai and published on March 23, 2021.
Pushover analysis of frame by force analogy method with force control based o...Salar Delavar Qashqai
This document describes a C program for performing pushover analysis of frames using the force analogy method based on Euler-Bernoulli beam theory. The program models plastic hinges using moment-rotation curves and outputs results in CSV and HTML files, including a base shear-displacement graph. It was written by Salar Delavar Qashqai and published on March 13, 2021.
This document contains information about optimizing a Pratt truss structure using Excel Solver, including:
- The program was written by Salar Delavar Ghashghaei on February 12, 2017.
- It provides member cross-sectional areas, displacement results from the optimization, and equilibrium equations for the joints of the truss structure.
- The objective is to minimize the total weight of the truss subject to stress constraints on each member.
Pushover analysis of triangular steel membrane element subjected to lateral d...Salar Delavar Qashqai
This MATLAB program models the pushover analysis of a triangular steel membrane subjected to lateral displacements. It uses finite element analysis to calculate the stiffness matrix and account for geometric and material nonlinearity under small strains. The program defines the geometry and material properties of the membrane, applies incremental lateral displacements, calculates the element stiffness matrices, and assembles the global stiffness matrix to solve for displacements at each step. The results of the MATLAB analysis are verified against a similar ABAQUS model.
Pushover analysis of simply support steel section beam based on plastic hinge...Salar Delavar Qashqai
This document describes a MATLAB program for performing pushover analysis of a simply supported steel beam based on plastic hinge concepts. The program defines parameters for the beam geometry and material properties. It calculates the section properties and element stiffness coefficients. Plastic hinge properties are also defined. The MATLAB program then performs the pushover analysis and reports on the number of iterations required for convergence at each increment. The results of the MATLAB analysis are then verified using SAP2000 software, which also reports completing the analysis in a small number of iterations.
Pushover analysis of steel section beam subjected to incremental vertical loa...Salar Delavar Qashqai
This document describes a MATLAB program that performs pushover analysis of a steel beam subjected to incremental vertical loads. The program models the beam as a fixed support beam, defines parameters such as beam geometry and material properties, and analyzes the beam up to failure by incrementally increasing the load and checking for plastic hinge formation. The results from MATLAB are verified against a model of the same beam analyzed in SAP2000.
Moment curvature analysis of unconfined concrete section with matlab and sap2000Salar Delavar Qashqai
This document presents a moment-curvature analysis of an unconfined concrete section using MATLAB and SAP2000. It describes the section properties, material properties of the steel reinforcement and concrete, and runs a moment-curvature analysis in SAP2000. The analysis results are presented over 17 increments showing the top strain, neutral axis depth, curvature, flexural rigidity, and moment. Graphs of the analysis curve and moment-curvature relationship are also given.
Large deformation analysis of cantilever beam subjected to concentrated const...Salar Delavar Qashqai
This document describes the large deformation analysis of a cantilever beam subjected to a concentrated vertical load using ABAQUS and MATLAB. The beam's properties, including its length, flexural rigidity, and applied load, are defined. The deformation of the beam is then analyzed using pseudo-linear, linear, and ABAQUS models, with the deflection, slope, shear, and moment results reported along the beam's length.
Moment curvature analysis unconfined concrete section with different tension...Salar Delavar Qashqai
This MATLAB program analyzes the moment-curvature behavior of unconfined concrete sections with varying amounts of tension steel reinforcement. It performs an incremental analysis to determine the moment-curvature response up to the ultimate concrete strain limit of 0.004. Results are presented for sections with tension reinforcement ratios (ρ) of 0, 0.2, 0.4, etc. The analysis converges successfully for each reinforcement ratio and reports the moment and curvature at each increment.
Optimization of steel section based on moment and section ductilitySalar Delavar Qashqai
This document describes a program for optimizing steel section designs based on moment and ductility. The program allows the user to find optimal layer lengths based on these criteria. It requires initial input conditions like maximum iterations, strain-stress relationships, and minimum/maximum layer lengths to function. The output then displays the results of the optimization analyses.
Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...Salar Delavar Qashqai
This C program performs a nonlinear analysis of a 2D cantilever beam with plastic hinges using force control. The program was written by Salar Delavar Ghashghaei and verified using ABAQUS. It includes functions for importing input data, calculating element stiffness matrices, inverting matrices, performing iterations to solve for displacements, and outputting results to Excel, MATLAB, and HTML files. The input data is checked for errors before running the analysis, which is reported with incremental loads, displacements, and rotations at each step. Plastic hinge data of moment vs. rotation is also reported.
Import data from csv excel file and export to xml excel file in c programmingSalar Delavar Qashqai
This C program imports data from a CSV file, analyzes it, and exports it to an XML Excel file. It reads double data values from the CSV file into arrays, checks for any negative or invalid values, and displays the data in a formatted table. It then writes the data and additional XML tags to a new XML file to generate an Excel spreadsheet with the formatted data table. The program opens the XML file upon completion for viewing.
This C program code generates elastic response spectra including displacement, pseudo-acceleration, and pseudo-velocity spectra needed for structural response spectrum analysis. The code uses the Newmark linear method to solve the equation of motions for different periods. It inputs ground motion acceleration data, performs the analysis, and outputs the response spectra and graphs the results in an HTML file for visualization.
This document discusses verifying C programs for structural eigen value analysis using the SEISMOSTRUCT v.7.0 structural analysis program. It was written by Salar Delavar Ghashghaei on October 28, 2018 and includes plots of the C code file, analysis file, input CSV file, and input for section properties, coordinate properties, restraint properties, and output restraint properties in SEISMOSTRUCT.
Pushover analysis force analogy method with force control based on timoshenko...Salar Delavar Qashqai
This C program performs a pushover analysis using the force analogy method based on Timoshenko beam theory. It includes functions for importing input data, defining system matrices, calculating element internal forces, and outputting results to Excel and HTML files. The program checks that all input data is valid before running the analysis, which consists of incrementally applying an external force and calculating displacements and member forces over the structure.
Analysis of 1st order and 2nd order nonlinear semi rigid connection braced fr...Salar Delavar Qashqai
This document describes a MATLAB program that analyzes the first-order and second-order nonlinear behavior of a braced frame subjected to lateral pushover loading. The program models the nonlinear rotational springs of the columns and axial displacement spring of the brace. It reports the results of the first-order and second-order nonlinear analyses, including displacement and base shear values, ductility and overstrength ratios, and initial and tangent structural stiffness values.
Analysis of 1st order and 2nd order nonlinear semi rigid connection frame sub...Salar Delavar Qashqai
This document describes a nonlinear analysis of a semi-rigid frame subjected to lateral displacement in MATLAB. Parameters for the frame geometry, material properties, and nonlinear rotational springs are defined. The analysis is conducted using both first-order and second-order theory, tracking displacement, base shear, and internal moments over increments. Results are provided for ductility ratio, overstrength ratio, initial stiffness, and tangent stiffness.
This MATLAB program performs moment-curvature analysis on confined concrete sections. It analyzes a sample reinforced concrete section with specified material properties and reinforcement details. The program outputs 54 increments of the analysis, reporting the strain, curvature, moment, and number of iterations to converge at each increment. The goal is to verify the MATLAB program against a commercial moment-curvature analysis software called XTRACT.
Moment curvature analysis of unconfined circular concrete pipe section with m...Salar Delavar Qashqai
This document presents a moment-curvature analysis of an unconfined circular concrete pipe section using MATLAB and SAP2000. The analysis calculates the moment-curvature relationship in increments and determines key values like elastic rigidity, plastic rigidity, and ductility ratio. Graphs of results are presented comparing concrete strain, rebar stress, rigidity, neutral axis, and moment-curvature between the two programs.
1st order pushover analysis of column subjected to compression and tension ax...Salar Delavar Qashqai
This document summarizes the results of a pushover analysis of a reinforced concrete column subjected to both compression and tension axial loads. The analysis was conducted using MATLAB and SeismoStruct to verify the MATLAB model. The column is modeled with unconfined concrete properties and bilinear steel reinforcement. The analysis reports the load-displacement response for the column in both compression and tension, including yield capacities, ultimate capacities, and ductility ratios.
Using recycled concrete aggregates (RCA) for pavements is crucial to achieving sustainability. Implementing RCA for new pavement can minimize carbon footprint, conserve natural resources, reduce harmful emissions, and lower life cycle costs. Compared to natural aggregate (NA), RCA pavement has fewer comprehensive studies and sustainability assessments.
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesChristina Lin
Traditionally, dealing with real-time data pipelines has involved significant overhead, even for straightforward tasks like data transformation or masking. However, in this talk, we’ll venture into the dynamic realm of WebAssembly (WASM) and discover how it can revolutionize the creation of stateless streaming pipelines within a Kafka (Redpanda) broker. These pipelines are adept at managing low-latency, high-data-volume scenarios.
Comparative analysis between traditional aquaponics and reconstructed aquapon...bijceesjournal
The aquaponic system of planting is a method that does not require soil usage. It is a method that only needs water, fish, lava rocks (a substitute for soil), and plants. Aquaponic systems are sustainable and environmentally friendly. Its use not only helps to plant in small spaces but also helps reduce artificial chemical use and minimizes excess water use, as aquaponics consumes 90% less water than soil-based gardening. The study applied a descriptive and experimental design to assess and compare conventional and reconstructed aquaponic methods for reproducing tomatoes. The researchers created an observation checklist to determine the significant factors of the study. The study aims to determine the significant difference between traditional aquaponics and reconstructed aquaponics systems propagating tomatoes in terms of height, weight, girth, and number of fruits. The reconstructed aquaponics system’s higher growth yield results in a much more nourished crop than the traditional aquaponics system. It is superior in its number of fruits, height, weight, and girth measurement. Moreover, the reconstructed aquaponics system is proven to eliminate all the hindrances present in the traditional aquaponics system, which are overcrowding of fish, algae growth, pest problems, contaminated water, and dead fish.
Embedded machine learning-based road conditions and driving behavior monitoringIJECEIAES
Car accident rates have increased in recent years, resulting in losses in human lives, properties, and other financial costs. An embedded machine learning-based system is developed to address this critical issue. The system can monitor road conditions, detect driving patterns, and identify aggressive driving behaviors. The system is based on neural networks trained on a comprehensive dataset of driving events, driving styles, and road conditions. The system effectively detects potential risks and helps mitigate the frequency and impact of accidents. The primary goal is to ensure the safety of drivers and vehicles. Collecting data involved gathering information on three key road events: normal street and normal drive, speed bumps, circular yellow speed bumps, and three aggressive driving actions: sudden start, sudden stop, and sudden entry. The gathered data is processed and analyzed using a machine learning system designed for limited power and memory devices. The developed system resulted in 91.9% accuracy, 93.6% precision, and 92% recall. The achieved inference time on an Arduino Nano 33 BLE Sense with a 32-bit CPU running at 64 MHz is 34 ms and requires 2.6 kB peak RAM and 139.9 kB program flash memory, making it suitable for resource-constrained embedded systems.
Understanding Inductive Bias in Machine LearningSUTEJAS
This presentation explores the concept of inductive bias in machine learning. It explains how algorithms come with built-in assumptions and preferences that guide the learning process. You'll learn about the different types of inductive bias and how they can impact the performance and generalizability of machine learning models.
The presentation also covers the positive and negative aspects of inductive bias, along with strategies for mitigating potential drawbacks. We'll explore examples of how bias manifests in algorithms like neural networks and decision trees.
By understanding inductive bias, you can gain valuable insights into how machine learning models work and make informed decisions when building and deploying them.
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Sinan KOZAK
Sinan from the Delivery Hero mobile infrastructure engineering team shares a deep dive into performance acceleration with Gradle build cache optimizations. Sinan shares their journey into solving complex build-cache problems that affect Gradle builds. By understanding the challenges and solutions found in our journey, we aim to demonstrate the possibilities for faster builds. The case study reveals how overlapping outputs and cache misconfigurations led to significant increases in build times, especially as the project scaled up with numerous modules using Paparazzi tests. The journey from diagnosing to defeating cache issues offers invaluable lessons on maintaining cache integrity without sacrificing functionality.
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsVictor Morales
K8sGPT is a tool that analyzes and diagnoses Kubernetes clusters. This presentation was used to share the requirements and dependencies to deploy K8sGPT in a local environment.
Advanced control scheme of doubly fed induction generator for wind turbine us...IJECEIAES
This paper describes a speed control device for generating electrical energy on an electricity network based on the doubly fed induction generator (DFIG) used for wind power conversion systems. At first, a double-fed induction generator model was constructed. A control law is formulated to govern the flow of energy between the stator of a DFIG and the energy network using three types of controllers: proportional integral (PI), sliding mode controller (SMC) and second order sliding mode controller (SOSMC). Their different results in terms of power reference tracking, reaction to unexpected speed fluctuations, sensitivity to perturbations, and resilience against machine parameter alterations are compared. MATLAB/Simulink was used to conduct the simulations for the preceding study. Multiple simulations have shown very satisfying results, and the investigations demonstrate the efficacy and power-enhancing capabilities of the suggested control system.
International Conference on NLP, Artificial Intelligence, Machine Learning an...gerogepatton
International Conference on NLP, Artificial Intelligence, Machine Learning and Applications (NLAIM 2024) offers a premier global platform for exchanging insights and findings in the theory, methodology, and applications of NLP, Artificial Intelligence, Machine Learning, and their applications. The conference seeks substantial contributions across all key domains of NLP, Artificial Intelligence, Machine Learning, and their practical applications, aiming to foster both theoretical advancements and real-world implementations. With a focus on facilitating collaboration between researchers and practitioners from academia and industry, the conference serves as a nexus for sharing the latest developments in the field.
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELgerogepatton
As digital technology becomes more deeply embedded in power systems, protecting the communication
networks of Smart Grids (SG) has emerged as a critical concern. Distributed Network Protocol 3 (DNP3)
represents a multi-tiered application layer protocol extensively utilized in Supervisory Control and Data
Acquisition (SCADA)-based smart grids to facilitate real-time data gathering and control functionalities.
Robust Intrusion Detection Systems (IDS) are necessary for early threat detection and mitigation because
of the interconnection of these networks, which makes them vulnerable to a variety of cyberattacks. To
solve this issue, this paper develops a hybrid Deep Learning (DL) model specifically designed for intrusion
detection in smart grids. The proposed approach is a combination of the Convolutional Neural Network
(CNN) and the Long-Short-Term Memory algorithms (LSTM). We employed a recent intrusion detection
dataset (DNP3), which focuses on unauthorized commands and Denial of Service (DoS) cyberattacks, to
train and test our model. The results of our experiments show that our CNN-LSTM method is much better
at finding smart grid intrusions than other deep learning algorithms used for classification. In addition,
our proposed approach improves accuracy, precision, recall, and F1 score, achieving a high detection
accuracy rate of 99.50%.
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;