Skip to content
Snippets Groups Projects
Commit bfa2ee8f authored by Powers, Peter M.'s avatar Powers, Peter M.
Browse files

add NehrpSiteClass; delete Vs30

parent b83463e4
No related branches found
No related tags found
1 merge request!144Lib work
package gov.usgs.earthquake.nshmp.calc;
/**
* Identifiers for commonly used values of Vs30. These correspond to the NEHERP
* site classes that have histroically been supported by the NSHMp in hazard
* calculations.
*
* @author U.S. Geological Survey
*/
@Deprecated
public enum Vs30 {
/** NEHRP site class A. */
VS_2000("Site class A"),
/** NEHRP site class B. */
VS_1150("Site class B"),
/** NEHRP B/C boundary site class. */
VS_760("B/C boundary"),
/** NEHRP site class C. */
VS_537("Site class C"),
/** NEHRP C/D boundary site class. */
VS_360("C/D boundary"),
/** NEHRP site class D. */
VS_259("Site class D"),
/** NEHRP D/E boundary site class. */
VS_180("D/E boundary");
private String label;
private double value;
private Vs30(String label) {
this.label = label;
this.value = Double.valueOf(name().substring(3));
}
@Override
public String toString() {
return this.name().substring(3) + " m/s (" + label + ")";
}
/**
* Return the Vs30 value for this identifier.
*/
public double value() {
return value;
}
/**
* Create a Vs30 constant from a Vs30 {@code value}.
* @param value to process
*/
public static Vs30 fromValue(double value) {
String name = "VS_" + (int) value;
return Enum.valueOf(Vs30.class, name);
}
}
package gov.usgs.earthquake.nshmp.gmm;
/**
* NEHRP site class identifier.
*
* <p>Over time, the equivalent Vs30 values for each site class have changed
* slightly and are documented with each NSHM.
*
* @author U.S. Geological Survey
*/
enum NehrpSiteClass {
/** Site class A, very hard rock. */
A("very hard rock"),
/** Site class A/B boundary, hard rock. */
AB("hard rock"),
/** Site class B, medium hard rock. */
B("medium hard rock"),
/** Site class B/C boundary, soft rock. */
BC("soft rock"),
/** Site class C, very dense soil or hard clay. */
C("very dense soil or hard clay"),
/** Site class C/D boundary, dense sand or very stiff clay. */
CD("dense sand or very stiff clay"),
/** Site class D, medium dense sand or stiff clay. */
D("medium dense sand or stiff clay"),
/** Site class D/E boundary, loose sand or medium stiff clay. */
DE("loose sand or medium stiff clay"),
/** Site class E, very loose sand or soft clay. */
E("very loose sand or soft clay");
private final String condition;
private NehrpSiteClass(String condition) {
this.condition = condition;
}
public String condition() {
return condition;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment