Class JSRMConfigBuilder
java.lang.Object
com.github.jbgust.jsrm.application.JSRMConfigBuilder
This class should be use to create a JSRMConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBuild the configurationwithAmbiantPressureInMPa(double ambiantPressureInMPa) Change local barometric pressure.withCombustionEfficiencyRatio(double combustionEfficiencyRatio) Change combustion efficiency rationwithDensityRatio(double densityRatio) Change density ratio (Grain actual density / Grain ideal density)withErosiveBurningAreaRatioThreshold(double erosiveBurningAreaRatioThreshold) Change ratio of core to throat cross-sectional areas, above which no erosive burning occurswithErosiveBurningVelocityCoefficient(double erosiveBurningVelocityCoefficient) An empirical constant.withNozzleEfficiency(double nozzleEfficiency) Change nozzle efficiencywithNozzleErosionInMillimeter(double nozzleErosionInMillimeter) Change increase in throat diameter due to erosionwithNozzleExpansionRatio(double nozzleExpansionRatio) Change ratio of cross-sectional areas of nozzle exit to throat.withNumberOfCalculationLine(int numberOfCalculationLine) Use to specify more or less line for calculationwithOptimalNozzleDesign(boolean optimalNozzleDesign) Use automatic calculation to obtain the optimum nozzle expansion ratio.withSafeKNFailure(boolean safeKNFailure) If the computation failed, you can set it to true.
-
Constructor Details
-
JSRMConfigBuilder
public JSRMConfigBuilder()
-
-
Method Details
-
withDensityRatio
Change density ratio (Grain actual density / Grain ideal density)- Parameters:
densityRatio- typically 0.90 to 0.98 (default 0.95)- Returns:
- the builder
-
withNozzleErosionInMillimeter
Change increase in throat diameter due to erosion- Parameters:
nozzleErosionInMillimeter- in millimeter (default 0.0mm)- Returns:
- the builder
-
withCombustionEfficiencyRatio
Change combustion efficiency ration- Parameters:
combustionEfficiencyRatio- Use 0.95 for fine grain propellant. Use 0.93 for coarse grain propellant (default 0.95)- Returns:
- the builder
-
withAmbiantPressureInMPa
Change local barometric pressure.- Parameters:
ambiantPressureInMPa- typically 0.101 MPa at sea level (default 0.101Mpa)- Returns:
- the builder
-
withErosiveBurningAreaRatioThreshold
public JSRMConfigBuilder withErosiveBurningAreaRatioThreshold(double erosiveBurningAreaRatioThreshold) Change ratio of core to throat cross-sectional areas, above which no erosive burning occurs- Parameters:
erosiveBurningAreaRatioThreshold- (default 6.0)- Returns:
- the builder
-
withErosiveBurningVelocityCoefficient
public JSRMConfigBuilder withErosiveBurningVelocityCoefficient(double erosiveBurningVelocityCoefficient) An empirical constant. Enter zero if no erosive burning expected.- Parameters:
erosiveBurningVelocityCoefficient- Typically 0.0 to 1.0 (default 0.0)- Returns:
- the builder
-
withNozzleEfficiency
Change nozzle efficiency- Parameters:
nozzleEfficiency- For a well-contoured, smooth nozzle, typically 0.75 to 0.85 (default 0.85)- Returns:
- the builder
-
withOptimalNozzleDesign
Use automatic calculation to obtain the optimum nozzle expansion ratio.- Parameters:
optimalNozzleDesign- If set to false, you have to set nozzle expansion ratio with .withNozzleExpansionRatio()- Returns:
- the builder
-
withNumberOfCalculationLine
Use to specify more or less line for calculation- Parameters:
numberOfCalculationLine- default value is 882 (same as SRM Excel file)- Returns:
- the builder
-
withNozzleExpansionRatio
Change ratio of cross-sectional areas of nozzle exit to throat. Should be set if optimalNozzleDesign is false- Parameters:
nozzleExpansionRatio- the expansion ratio- Returns:
- the builder
-
withSafeKNFailure
If the computation failed, you can set it to true. This parameter help to compute low KN motor that normaly failed. The result will be less precise.- Parameters:
safeKNFailure- true to use safeKN feature- Returns:
- the builder
-
createJSRMConfig
Build the configuration- Returns:
- the config
-