Earthquake Simulation

Palak Chawla · 2025

Read Earthquake Simulation by Palak Chawla (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-09673.txt.

Introduction

Palak Chawla built a computer simulator that shows how earthquakes work, described in a short 2025 paper. Written in the C programming language, the program models how fault lines affect pressure at the surface during seismic activity. It is fully interactive, inviting users to explore the mechanics directly rather than read about them. The stated aim is educational: to make studying earthquakes more accessible, more engaging, and cheaper than physical models or commercial software. The paper presents the simulator as a learning resource for students encountering seismology basics.

Catalog record

CREATORPalak Chawla
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE11 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2504-09673

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Earthquake Simulation Project Thanks: *Equal Contribution. Palak Chawla Abstract This paper presents a seismic activity simulator that models the effects of fault lines on surface pressure. This project uses C programming to create a fully interactive learning resource intended to educate users on the mechanics of earthquakes. The motivation behind this project is to make studying seismic activity more accessible, engaging and cost effective. I Introduction Earthquakes are highly destructive natural disasters that cause over tens of thousands of deaths each year [ 1 ] , as well as significant property damage, and tens of billions in dollars of financial loss in the United States alone [ 2 ] . It is imperative to understand the workings of earthquakes in order to further preventative measures to minimize damages. This simulator was created in order to facilitate this learning and lead to breakthroughs in earthquake forecasting and prevention technology. This simulator uses C programming to allow users to input geographical area and fault lines, which are used to provide a visual, complete with color coding to help the user identify patterns within the output and understand seismology. This paper covers the development of the code, including the explanations of the functions and algorithms used, explanations of edge cases, and related projects in earthquake forecasting technology. II Related Works The Convolutional Recurrent Model for Earthquake Identification and Magnitude Estimation was created at the Frankfurt Institute for Advanced Studies and Goethe University in Frankfurt, by Megha Chakraborty, Darius Fenner, Wei Li, Johannes Faber, Kai Zhou, Georg Rümpker, Horst Stöcker, and Nishtha Srivastava. [ 3 ] This project aimed to enhance the accuracy of earthquake identification and magnitude estimation. They accomplished this by using large datasets of seismic activity and using machine learning techniques to teach the model to recognize patterns and predict earthquake occurrences. The Convolutional Recurrent Model for Earthquake Identification and Magnitude Estimation is an effective tool to predict earthquakes since it is based on real life data, whereas the project in this paper is more suitable to be used as a learning resource to allow one to understand seismic patterns. The Uniform California Earthquake Rupture Forecast was a project done at Columbia University under Dr. Bruce E. Shaw. [ 4 ] This project aimed to enhance the accuracy and physical realism of seismic hazard modeling through large-scale, physics-based earthquake simulators. They accomplished this goal using advanced simulation techniques with physically informed modeling to produce more accurate reliable tools for earthquake hazard analysis. This project is more similar to the one in this paper as it is also a physics-based simulator seeking to improve the understanding of fault line and stress level interactions. III Methodology III-A Overview The program is organized into 8 functions. Print fault map, print surface map, vertical, horizontal, circular, point to point, update surface, and main. The print fault map function prints the fault map array, the print surface map prints the surface map array, the vertical function adds a user defined vertical line on to the fault map array, the horizontal function adds a user defined horizontal line onto the fault map array, the circular line adds circle onto the fault map array based on a user defined center point, the point to point function adds a line to the fault line function based on two user defined points, the update surface function when called in main after the fault map has been fully updated adds random stress to the surface stress array based on whether or not the point is on a fault. The code relies on 2D arrays to represent the geographical area to draw the fault lines on, as well as to simulate the different stress levels. There were two main algorithms that were used to compute the shapes to draw on the fault map. The Bresenham’s line algorithm, and the midpoint circle algorithm. The main function starts by providing the user with a menu to decide what shape they would like to add to the fault grid. This code utilizes the standard input output library to facilitate the printing of output onto the screen as well as taking in the input needed to run the simulation. Additionally, the standard library is utilized to use the random function to simulate surface stress values, as well as the time library to seed time within the random number generator. Lastly, the universal standard library is used to employ the sleep function to slow down the output, making it clearer for the user to see how the simulation updates. III-B Functions III-B 1 Print Fault Map The print fault map function prints out the 2D grid on which the fault lines are entered. It prints fault line points in red using the number 1, and the non fault lines using the number 0 in white. As the user enters the different shapes which are stored on the array, this function prints. III-B 2 Print Surface Map The print surface map function prints out the 2D grid on which the surface pressure is updating. It colors the low stress points in green, medium stress points in yellow, high stress points in red, and earthquake points in blue. This is done by printing these points from the surface stress array in colors using the ANSI escape codes that are defined as symbolic constants on top of the code. III-B 3 Vertical The vertical function takes in x coordinate input, and starts by checking if the input is valid. If the point is valid, a vertical line is drawn at that x coordinate on the fault map array. If the input is not within range of the grid, an error message is printed. III-B 4 Horizontal The horizontal function takes in y coordinate input, and starts by checking if the input is valid. If the point is valid, a horizontal line is drawn at that y coordinate on the fault map array. If the input is not within range of the grid, an error message is printed. III-B 5 Circular The circular function takes in input x and y of a coordinate, which is the center point of the circle. The function starts by ensuring that the value is within the range of the grid, printing an error message if not, then executes the midpoint circle algorithm to plot a circle on the graph. This requires starting at the highest point of the circle which is at the x coordinate 0 and the y coordinate is the radius of the circle. Then moving horizontally or diagonally based on calculating the error. The circle is divided into 8 equal sections, called octants. While we draw the circle, the drawing gets mirrored over the full circle, because of the if statements implemented to do so for each octant. This way, an accurate circle can be drawn using minimal calculations. A check is then done to see if half the circle is complete, implying the rest is done too due to the mirroring. Once the circle is complete, the fault map is updated. III-B 6 Point to Point The point to point function uses the Bresenham’s line algorithm to efficiently draw a line between two user-defined coordinates. The user is asked for the

Read the complete text