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, 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.
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, 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.
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.
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.
This document contains code snippets for various operations on linked lists and polynomials in C programming language. It includes 9 questions covering topics like:
1. Counting characters, words, digits in a string
2. Squeezing a string by removing spaces
3. Swapping values using pointers
4. Comparing two strings
5. Concatenating two strings
6. Multiplying two matrices
7. Reversing a string
8. Performing insertion, deletion and traversal on singly linked lists
9. Implementing polynomial addition and multiplication by representing polynomials as linked lists
For each question, the C code to implement the operation is provided along with sample input/output.
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.
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.
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, 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.
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.
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.
This document contains code snippets for various operations on linked lists and polynomials in C programming language. It includes 9 questions covering topics like:
1. Counting characters, words, digits in a string
2. Squeezing a string by removing spaces
3. Swapping values using pointers
4. Comparing two strings
5. Concatenating two strings
6. Multiplying two matrices
7. Reversing a string
8. Performing insertion, deletion and traversal on singly linked lists
9. Implementing polynomial addition and multiplication by representing polynomials as linked lists
For each question, the C code to implement the operation is provided along with sample input/output.
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.
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.
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.
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.
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 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.
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.
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.
This document contains computer programming lab solutions for various problems as per the JNTU Hyderabad syllabus. It is authored by Srinivas Reddy Amedapu, a full time research scholar at the National Institute of Technology in Trichy, Tamil Nadu. The document provides C code solutions to problems like finding the sum of digits of a number, generating Fibonacci sequences, finding prime numbers between a range, calculating mathematical series, solving quadratic equations, recursive and non-recursive functions for factorial and GCD, the Towers of Hanoi problem, distance calculation with velocity and acceleration, a calculator program using switch statements, finding minimum and maximum elements in an array, and matrix addition. Contact details for S
The document contains a data structures lab manual with experiments on various data structure topics like arrays, stacks, queues, linked lists, and binary search trees. It includes C programs and explanations for inserting and deleting elements from arrays, stacks and queues. It also includes programs for matrix operations, sparse matrix representation, linear and binary searches. The experiments cover basic operations on common data structures.
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 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
This document describes research on identifying extract method refactoring opportunities through program analysis and tool support. It discusses limitations of early work, such as not supporting extraction of objects or composite variables. It presents techniques to address these limitations, including handling behavior preservation issues and ensuring the complete computation of extracted variables. Evaluation results of tools are provided, showing improvements in precision and recall over time. The document also discusses how the work influenced the researcher's career and other researchers.
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.
The document contains 10 C++ programs that demonstrate various programming concepts like arithmetic operators, if-else statements, loops, arrays, etc. Each program is presented with its source code and expected output.
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.
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.
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORYRadha Maruthiyan
This document contains the code for several C++ programs demonstrating object-oriented programming concepts like inheritance, polymorphism, constructors, destructors, and more. It includes the code, algorithms, outputs, and results for examples using single, multilevel, multiple, and hybrid inheritance. It also covers examples for constructor/destructor usage, copy constructors, friend functions/classes, and polymorphism implementation. The programs are part of a course on Programming and Data Structures II taught at Sree Sakthi Engineering College in India.
The document contains programs for various data structures and algorithms concepts in C language. It includes programs for 1) array operations using menu driven program, 2) string operations like pattern matching, 3) stack operations using array implementation, 4) infix to postfix conversion, 5) evaluation of postfix expression and tower of Hanoi problem using stack, 6) circular queue operations using array, 7) linked list operations on student data, and 8) doubly linked list operations on employee data. Each section provides the full code for a menu driven program to perform various operations on the given data structure.
This document provides code for a program that converts infix expressions to postfix expressions. It includes functions for pushing and popping elements in a stack, determining operator precedence, and converting an infix string to postfix by processing each character. The main function gets an infix expression from the user, calls the conversion function, and prints the infix and postfix expressions. The program supports operators like +, -, *, /, %, ^ and parentheses.
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 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.
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.
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.
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 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.
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.
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.
This document contains computer programming lab solutions for various problems as per the JNTU Hyderabad syllabus. It is authored by Srinivas Reddy Amedapu, a full time research scholar at the National Institute of Technology in Trichy, Tamil Nadu. The document provides C code solutions to problems like finding the sum of digits of a number, generating Fibonacci sequences, finding prime numbers between a range, calculating mathematical series, solving quadratic equations, recursive and non-recursive functions for factorial and GCD, the Towers of Hanoi problem, distance calculation with velocity and acceleration, a calculator program using switch statements, finding minimum and maximum elements in an array, and matrix addition. Contact details for S
The document contains a data structures lab manual with experiments on various data structure topics like arrays, stacks, queues, linked lists, and binary search trees. It includes C programs and explanations for inserting and deleting elements from arrays, stacks and queues. It also includes programs for matrix operations, sparse matrix representation, linear and binary searches. The experiments cover basic operations on common data structures.
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 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
This document describes research on identifying extract method refactoring opportunities through program analysis and tool support. It discusses limitations of early work, such as not supporting extraction of objects or composite variables. It presents techniques to address these limitations, including handling behavior preservation issues and ensuring the complete computation of extracted variables. Evaluation results of tools are provided, showing improvements in precision and recall over time. The document also discusses how the work influenced the researcher's career and other researchers.
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.
The document contains 10 C++ programs that demonstrate various programming concepts like arithmetic operators, if-else statements, loops, arrays, etc. Each program is presented with its source code and expected output.
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.
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.
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORYRadha Maruthiyan
This document contains the code for several C++ programs demonstrating object-oriented programming concepts like inheritance, polymorphism, constructors, destructors, and more. It includes the code, algorithms, outputs, and results for examples using single, multilevel, multiple, and hybrid inheritance. It also covers examples for constructor/destructor usage, copy constructors, friend functions/classes, and polymorphism implementation. The programs are part of a course on Programming and Data Structures II taught at Sree Sakthi Engineering College in India.
The document contains programs for various data structures and algorithms concepts in C language. It includes programs for 1) array operations using menu driven program, 2) string operations like pattern matching, 3) stack operations using array implementation, 4) infix to postfix conversion, 5) evaluation of postfix expression and tower of Hanoi problem using stack, 6) circular queue operations using array, 7) linked list operations on student data, and 8) doubly linked list operations on employee data. Each section provides the full code for a menu driven program to perform various operations on the given data structure.
This document provides code for a program that converts infix expressions to postfix expressions. It includes functions for pushing and popping elements in a stack, determining operator precedence, and converting an infix string to postfix by processing each character. The main function gets an infix expression from the user, calls the conversion function, and prints the infix and postfix expressions. The program supports operators like +, -, *, /, %, ^ and parentheses.
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.
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.
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 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 document contains some programs of C using Data structures, like Stack, LinkedList, queue, Fibonacci series, addition and multiplication of two matrices,etc.
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 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 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 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 program uses recursive functions to:
1. Calculate the standard deviation of an array of values by calculating the mean, summing the squared differences from the mean, and taking the square root.
2. Find the factorial of a number by multiplying it by the factorial of the previous number down to 1.
3. Find the sum of odd numbers between a range by recursively adding each odd number.
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 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.
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 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.
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.
This document discusses functions in C programming. It covers defining and declaring functions, variable scope, parameter passing, inline functions, recursive functions, function arguments, and function applications. It provides examples of function definitions and calls using integers, strings, and arrays. It explains call by value, call by address, and call by reference parameter passing. It also discusses global, private, and static variables and using the scope resolution operator.
This document contains source code for 14 programs written in C programming language by Sumant Diwakar as part of a practical file for a Computer Programming Lab course. The programs include conversions between Fahrenheit and Celsius temperatures, checking if a number is a perfect square, sorting numbers in ascending and descending order, checking vowels, calculating factorials, and other numerical calculations and patterns. Each program section contains the source code and output for that program.
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.
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.
This study Examines the Effectiveness of Talent Procurement through the Imple...DharmaBanothu
In the world with high technology and fast
forward mindset recruiters are walking/showing interest
towards E-Recruitment. Present most of the HRs of
many companies are choosing E-Recruitment as the best
choice for recruitment. E-Recruitment is being done
through many online platforms like Linkedin, Naukri,
Instagram , Facebook etc. Now with high technology E-
Recruitment has gone through next level by using
Artificial Intelligence too.
Key Words : Talent Management, Talent Acquisition , E-
Recruitment , Artificial Intelligence Introduction
Effectiveness of Talent Acquisition through E-
Recruitment in this topic we will discuss about 4important
and interlinked topics which are
Blood finder application project report (1).pdfKamal Acharya
Blood Finder is an emergency time app where a user can search for the blood banks as
well as the registered blood donors around Mumbai. This application also provide an
opportunity for the user of this application to become a registered donor for this user have
to enroll for the donor request from the application itself. If the admin wish to make user
a registered donor, with some of the formalities with the organization it can be done.
Specialization of this application is that the user will not have to register on sign-in for
searching the blood banks and blood donors it can be just done by installing the
application to the mobile.
The purpose of making this application is to save the user’s time for searching blood of
needed blood group during the time of the emergency.
This is an android application developed in Java and XML with the connectivity of
SQLite database. This application will provide most of basic functionality required for an
emergency time application. All the details of Blood banks and Blood donors are stored
in the database i.e. SQLite.
This application allowed the user to get all the information regarding blood banks and
blood donors such as Name, Number, Address, Blood Group, rather than searching it on
the different websites and wasting the precious time. This application is effective and
user friendly.
Null Bangalore | Pentesters Approach to AWS IAMDivyanshu
#Abstract:
- Learn more about the real-world methods for auditing AWS IAM (Identity and Access Management) as a pentester. So let us proceed with a brief discussion of IAM as well as some typical misconfigurations and their potential exploits in order to reinforce the understanding of IAM security best practices.
- Gain actionable insights into AWS IAM policies and roles, using hands on approach.
#Prerequisites:
- Basic understanding of AWS services and architecture
- Familiarity with cloud security concepts
- Experience using the AWS Management Console or AWS CLI.
- For hands on lab create account on [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
# Scenario Covered:
- Basics of IAM in AWS
- Implementing IAM Policies with Least Privilege to Manage S3 Bucket
- Objective: Create an S3 bucket with least privilege IAM policy and validate access.
- Steps:
- Create S3 bucket.
- Attach least privilege policy to IAM user.
- Validate access.
- Exploiting IAM PassRole Misconfiguration
-Allows a user to pass a specific IAM role to an AWS service (ec2), typically used for service access delegation. Then exploit PassRole Misconfiguration granting unauthorized access to sensitive resources.
- Objective: Demonstrate how a PassRole misconfiguration can grant unauthorized access.
- Steps:
- Allow user to pass IAM role to EC2.
- Exploit misconfiguration for unauthorized access.
- Access sensitive resources.
- Exploiting IAM AssumeRole Misconfiguration with Overly Permissive Role
- An overly permissive IAM role configuration can lead to privilege escalation by creating a role with administrative privileges and allow a user to assume this role.
- Objective: Show how overly permissive IAM roles can lead to privilege escalation.
- Steps:
- Create role with administrative privileges.
- Allow user to assume the role.
- Perform administrative actions.
- Differentiation between PassRole vs AssumeRole
Try at [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
Height and depth gauge linear metrology.pdfq30122000
Height gauges may also be used to measure the height of an object by using the underside of the scriber as the datum. The datum may be permanently fixed or the height gauge may have provision to adjust the scale, this is done by sliding the scale vertically along the body of the height gauge by turning a fine feed screw at the top of the gauge; then with the scriber set to the same level as the base, the scale can be matched to it. This adjustment allows different scribers or probes to be used, as well as adjusting for any errors in a damaged or resharpened probe.
Open Channel Flow: fluid flow with a free surfaceIndrajeet sahu
Open Channel Flow: This topic focuses on fluid flow with a free surface, such as in rivers, canals, and drainage ditches. Key concepts include the classification of flow types (steady vs. unsteady, uniform vs. non-uniform), hydraulic radius, flow resistance, Manning's equation, critical flow conditions, and energy and momentum principles. It also covers flow measurement techniques, gradually varied flow analysis, and the design of open channels. Understanding these principles is vital for effective water resource management and engineering applications.
Accident detection system project report.pdfKamal Acharya
The Rapid growth of technology and infrastructure has made our lives easier. The
advent of technology has also increased the traffic hazards and the road accidents take place
frequently which causes huge loss of life and property because of the poor emergency facilities.
Many lives could have been saved if emergency service could get accident information and
reach in time. Our project will provide an optimum solution to this draw back. A piezo electric
sensor can be used as a crash or rollover detector of the vehicle during and after a crash. With
signals from a piezo electric sensor, a severe accident can be recognized. According to this
project when a vehicle meets with an accident immediately piezo electric sensor will detect the
signal or if a car rolls over. Then with the help of GSM module and GPS module, the location
will be sent to the emergency contact. Then after conforming the location necessary action will
be taken. If the person meets with a small accident or if there is no serious threat to anyone’s
life, then the alert message can be terminated by the driver by a switch provided in order to
avoid wasting the valuable time of the medical rescue team.
Digital Twins Computer Networking Paper Presentation.pptxaryanpankaj78
A Digital Twin in computer networking is a virtual representation of a physical network, used to simulate, analyze, and optimize network performance and reliability. It leverages real-time data to enhance network management, predict issues, and improve decision-making processes.
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
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 Ghashghaei – Publication Date: 02/November/2018
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;