Skip to content

A program which calculated the stress and displacement fields and the stress and displacement trajectories for AEM in liner elasticity.

Notifications You must be signed in to change notification settings

eriktoller/stress_displacement_calcualtor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Stress and Displacement Calculator

A program which calculated the stress field for given functions and grid. The input files for the plot properties and the physical constants are provided through the MATLAB program bin_write.m and the program bin_read.m can be sued to plot the results calculated by stress_field_calculator.cpp.

At the moment the programs does not sync automatically and must be manually run in both MATLAB and the preferred C++ editor. Also, the function for the stresses are coded in the C++ file and changing these, or appending new functions, requires changes in the main code.

The program now includes the analytic element for gravity, and it produces the Cartesian stress field ( , & ), the principal stress field ( , & ) and the principal stress trajectories. Also, it computes the displacement filed and the displacement trajectories. For a given resolution and coordinates.

A log file, log.txt, is created with all the variable data and time stamp.

This program has been developed using Microsoft Visual Stuido and only the .cpp file is included in the repository.

Instructions

To generate plot for stresses filed (here only for gravity at the moment) follow the following procedure:

  1. Run bin_write.m
    • Generates the input data and plot data in input_data.bin and plot_data.bin.
  2. Run sw_calculator_code.cpp
    • Calculates the stress fields and provide them in data.bin and the dimensions in dim_data.bin.
  3. Run bin_read.m
    • Reads the data and plots the stress fields.

Included

The program inludes several analytic element for linear elasticity. Currently the following anlaytic elements are included:

  • gravity,
  • cracks (not yet released) and
  • circular tunnel (not yet released).

Input data

This list contains all the definitions of the user input data defined in bin_wirte.m. These are the model properties:

  • H the elevation for where the gravity is set to zero
  • rho the density of the elastic medium
  • g the Newtonian constant of gravitation
  • nu the Poisson's ratio
  • kappa the bulk modulus (is calculated by default with kappa = 3-4*nu)
  • sigma_11inf the uniform stress state
  • nc inclued with cracks
  • m inclued with cracks
  • z1 inclued with cracks
  • z2 inclued with cracks
  • L inclued with cracks
  • mu inclued with cracks
  • beta inclued with cracks
  • nt inclued with circular tunnel
  • mt inclued with circular tunnel
  • z0 inclued with circular tunnel
  • R inclued with circular tunnel
  • a inclued with circular tunnel
  • b inclued with circular tunnel

These are the plotting properties:

  • xfrom the starting value for x-axis
  • xto the end value for the x-axis
  • yfrom the starting value for the y-axis
  • yto the end value for the y-axis
  • Nx the number of grid points in the x-diraction
  • Ny the number of grid points in the y-direction
  • Ntraj the number of steps for the stress trajectories
  • lvs_traj the number of stress trajectories
  • xtraj the vector containing the start and end point for the line hwere the trajectores are evenly spaced, for
  • ytraj the vector containing the start and end point for the line hwere the trajectores are evenly spaced, for
  • Nw the number of grid points in the x- and y-direction for the displacements

Created by,

Erik Toller

About

A program which calculated the stress and displacement fields and the stress and displacement trajectories for AEM in liner elasticity.

Resources

Stars

Watchers

Forks

Packages

No packages published