Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.04 KB | None | 0 0
  1. /*  CL = Charge Length
  2.     SL = Stemming Length
  3.     D = Borehole Diameter
  4.     SDOB = Safe Blast Distance
  5.     ED = Explosive Density
  6.     SD = Safe Distance
  7.     FOS = Factor of Safety
  8.  
  9. */
  10.  
  11. import java.util.Scanner;
  12.  
  13. class AssignmentOne{
  14.  
  15.     public static void main(String[] args)
  16.     {
  17.    
  18.        
  19.        
  20.         double CL, SL, D, ED, FOS, CCLF, SDOB, SD;
  21.  
  22.             ED = 1.2;
  23.        
  24.             FOS = 2.0;     
  25.                    
  26.                     Scanner scanner = new Scanner(System.in);
  27.                
  28.                 System.out.print("Charge length (m): ");
  29.                     CL = scanner.nextDouble();
  30.                
  31.                 System.out.print("Stemming length (m): ");
  32.                         SL = scanner.nextDouble();
  33.                
  34.                 System.out.print("Borehole diameter (mm): ");
  35.                         D = scanner.nextDouble();
  36.        
  37.                
  38.         CCLF = 1000 * CL / D;
  39.        
  40.         if( CCLF >10) {
  41.            
  42.         CCLF = 10;}
  43.            
  44.             else { CCLF = (1000 * CL / D);         
  45.         }
  46.        
  47.         SDOB =  (SL + 0.0005 * CCLF * D) / (0.00923 * (CCLF * Math.pow(D, 3) * ED)); Math.pow(SDOB, 0.333);
  48.    
  49.         SD = (FOS * 11 * Math.pow(SDOB, -2.167)) * Math.pow(D, 0.667);
  50.        
  51.  
  52.             System.out.println("The safe distance is: " + SD);
  53.            
  54.     }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement