Skip to content

Commit 093ec76

Browse files
committed
Merge pull request #134 from kwschultz/master
Fixing unit conventions for moment magnitude
2 parents db1df5e + 224dfde commit 093ec76

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

quakelib/src/QuakeLibIO.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ void quakelib::ModelWorld::create_section(std::vector<unsigned int> &unused_trac
756756
double moment_magnitude = 4.0+log10(conv.sqm2sqkm(fault_area));
757757

758758
for (unsigned int i=0; i<elem_ids.size(); ++i) {
759-
double max_slip = pow(10, (3.0/2.0)*(moment_magnitude+10.7))/(1e7*element(elem_ids[i]).lame_mu()*fault_area);
759+
double max_slip = pow(10, (3.0/2.0)*(moment_magnitude+6.0))/(element(elem_ids[i]).lame_mu()*fault_area);
760760
element(elem_ids[i]).set_max_slip(max_slip);
761761
}
762762
}
@@ -872,7 +872,8 @@ void quakelib::ModelWorld::create_faults(const std::string &taper_method) {
872872
// Schultz: Adapted from Steve Ward's model, used in the EQSim comparison for UCERF2 model
873873
void quakelib::ModelWorld::compute_stress_drops(const double &stress_drop_factor) {
874874
std::map<UIndex, ModelElement>::iterator eit;
875-
UIndex fault_id;
875+
UIndex fault_id;
876+
Conversion conv;
876877
ModelFault this_fault;
877878
double fault_area, fault_length, fault_width, char_magnitude, char_slip, R, nu, stress_drop;
878879

@@ -886,8 +887,8 @@ void quakelib::ModelWorld::compute_stress_drops(const double &stress_drop_factor
886887
fault_length = this_fault.length();
887888
fault_width = fault_area/fault_length;
888889

889-
char_magnitude = 4.0+log10(fault_area*1e-6) + stress_drop_factor;
890-
char_slip = pow(10, (3.0/2.0)*(char_magnitude+10.7))/(1e7*eit->second.lame_mu()*fault_area);
890+
char_magnitude = 4.0+log10(conv.sqm2sqkm(fault_area)) + stress_drop_factor;
891+
char_slip = pow(10, (3.0/2.0)*(char_magnitude+6.0))/(eit->second.lame_mu()*fault_area);
891892

892893
nu = 0.5*eit->second.lame_lambda()/(eit->second.lame_mu() + eit->second.lame_lambda());
893894
R = sqrt(fault_width*fault_width + fault_length*fault_length);
@@ -2254,7 +2255,7 @@ int quakelib::ModelWorld::read_files_eqsim(const std::string &geom_file_name, co
22542255
double moment_magnitude = 4.0+log10(conv.sqm2sqkm(fault_areas[eit->section_id()]));
22552256

22562257
// Need to document where this scaling law comes from
2257-
double max_slip = pow(10, (3.0/2.0)*(moment_magnitude+10.7))/(1e7*(eit->lame_mu())*fault_areas[eit->section_id()]);
2258+
double max_slip = pow(10, (3.0/2.0)*(moment_magnitude+6.0))/((eit->lame_mu())*fault_areas[eit->section_id()]);
22582259

22592260
// Set the max slip for the current element
22602261
eit->set_max_slip(max_slip);

quakelib/src/QuakeLibIO.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ namespace quakelib {
898898
moment += it->_slip*it->_mu*it->_area;
899899
}
900900

901-
_data._event_magnitude = (2.0/3.0)*log10(1e7*moment) - 10.7;
901+
_data._event_magnitude = (2.0/3.0)*log10(moment) - 6.0;
902902
}
903903

904904
//! Get the total amount a given block slipped during this event
@@ -930,7 +930,7 @@ namespace quakelib {
930930
moment += getBlockMu(*it)*getEventSlip(*it)*getEventArea(*it);
931931
}
932932

933-
return (2.0/3.0)*log10(1e7*moment) - 10.7;
933+
return (2.0/3.0)*log10(moment) - 6.0;
934934
}
935935

936936
//! Get the magnitude of the earthquake in this event.

src/core/Simulation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class Simulation : public SimFramework, public VCParams, public VCSimData, publi
233233

234234
// Get current expected slip from the current event area
235235
char_magnitude = 4.0+log10(current_event_area*1e-6) + stressDropFactor();
236-
char_slip = pow(10, (3.0/2.0)*(char_magnitude+10.7))/(1e7*getBlock(gid).lame_mu()*current_event_area);
236+
char_slip = pow(10, (3.0/2.0)*(char_magnitude+6.0))/(getBlock(gid).lame_mu()*current_event_area);
237237

238238
dynamicStressDrop = -2*getBlock(gid).lame_mu()*char_slip*( (1-nu)*fault_length/fault_width + fault_width/fault_length )/( (1-nu)*M_PI*R );
239239

src/simulation/RunEvent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ void RunEvent::processAftershock(Simulation *sim) {
811811

812812
// Determine the amount of slip needed to match the aftershock magnitude
813813
// The contribution of each block to moment is based on its fraction of total area*mu
814-
double total_moment = pow(10, (as.mag + 10.7)*(3.0/2.0))/1e7;
814+
double total_moment = pow(10, (as.mag + 6.0)*(3.0/2.0));
815815

816816
for (bit=id_set.begin(); bit!=id_set.end(); ++bit) {
817817
Block &b=sim->getBlock(*bit);

0 commit comments

Comments
 (0)