Class BiogasUpgrader
java.lang.Object
neqsim.util.NamedBaseClass
neqsim.process.SimulationBaseClass
neqsim.process.equipment.ProcessEquipmentBaseClass
neqsim.process.equipment.splitter.BiogasUpgrader
- All Implemented Interfaces:
Serializable, Runnable, ProcessEquipmentInterface, ProcessElementInterface, SimulationInterface, NamedInterface
Biogas upgrader for producing biomethane from raw biogas.
Removes CO2, H2S, and other impurities from raw biogas to produce pipeline-quality biomethane suitable for grid injection or vehicle fuel. Internally uses component-selective splitting to model the separation, with technology-specific removal efficiencies and energy consumption.
Upgrading Technologies
| Technology | CO2 Removal | CH4 Recovery | Energy (kWh/Nm3) |
|---|---|---|---|
| WATER_SCRUBBING | 96-98% | 98% | 0.25-0.30 |
| AMINE_SCRUBBING | 99% | 99.9% | 0.12-0.15 |
| MEMBRANE | 96-98% | 99.5% | 0.20-0.30 |
| PSA | 97-98% | 98% | 0.20-0.25 |
Usage example:
BiogasUpgrader upgrader = new BiogasUpgrader("BGU-1", rawBiogasStream);
upgrader.setTechnology(BiogasUpgrader.UpgradingTechnology.AMINE_SCRUBBING);
upgrader.run();
StreamInterface biomethane = upgrader.getBiomethaneOutStream();
StreamInterface offgas = upgrader.getOffgasOutStream();
double methaneContent = upgrader.getBiomethaneMethanePercent();
double wobbe = upgrader.getWobbeIndex();
- Version:
- 1.0
- Author:
- Even Solbraa
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumUpgrading technology enumeration. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleCO2 content in biomethane product (vol%).private doubleBiomethane product flow rate in Nm3/hr.private doubleMethane content in biomethane product (vol%).private StreamInterfaceUpgraded biomethane (methane-rich) outlet stream.private doubleCO2 removal efficiency override (NaN = use technology default).private doubleEnergy consumption in kW.private doubleH2S removal efficiency override (NaN = use technology default).private booleanWhether the upgrader has been run.private StreamInterfaceInlet raw biogas stream.private static final org.apache.logging.log4j.LoggerLogger instance.private doubleMethane recovery override (NaN = use technology default).private doubleMethane slip to off-gas as percent of inlet methane.private StreamInterfaceOff-gas (CO2-rich) outlet stream.private doubleTarget outlet pressure for biomethane in bara.private doubleRaw biogas flow rate in Nm3/hr.private static final longSerialization version UID.private doubleSpecific energy override in kWh/Nm3 (NaN = use technology default).Upgrading technology.private doubleWobbe index of biomethane product in MJ/Nm3.Fields inherited from class ProcessEquipmentBaseClass
conditionAnalysisMessage, energyStream, hasController, isSolved, properties, reportFields inherited from class SimulationBaseClass
calcIdentifier, calculateSteadyState, timeFields inherited from class NamedBaseClass
name -
Constructor Summary
ConstructorsConstructorDescriptionBiogasUpgrader(String name) Creates a biogas upgrader with the given name.BiogasUpgrader(String name, StreamInterface inletStream) Creates a biogas upgrader with the given name and inlet stream. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcalculateQualityMetrics(SystemInterface biomethaneFluid, double ch4Recovery, double energyPerNm3) Calculates biomethane quality metrics after the split.doubleReturns the CO2 content of the biomethane product as volume percent.doubleReturns the biomethane product volumetric flow rate in Nm3/hr.doubleReturns the methane content of the biomethane product as volume percent.Returns the upgraded biomethane outlet stream.doubleReturns the energy consumption of the upgrading process in kW.Gets the inlet stream.Returns all inlet streams connected to this equipment.doubleReturns the methane slip to the off-gas as a percentage of inlet methane.private doublegetMoleFractionPercent(SystemInterface fluid, String componentName) Returns the mole fraction of a component as a percentage.Returns the off-gas (CO2-rich) outlet stream.Returns all outlet streams produced by this equipment.doubleReturns the raw biogas volumetric flow rate in Nm3/hr.Returns a map of key results from the upgrader simulation.Gets the upgrading technology.doubleReturns the Wobbe index of the biomethane product in MJ/Nm3.voidRuns the biogas upgrader simulation.voidsetCO2RemovalEfficiency(double efficiency) Sets the CO2 removal efficiency override.voidsetH2SRemovalEfficiency(double efficiency) Sets the H2S removal efficiency override.voidsetInletStream(StreamInterface stream) Sets the inlet raw biogas stream.voidsetMethaneRecovery(double recovery) Sets the methane recovery override.voidsetOutletPressure(double pressureBara) Sets the target outlet pressure for the biomethane stream in bara.voidsetSpecificEnergy(double energy) Sets the specific energy consumption override in kWh per Nm3 raw biogas.voidSets the upgrading technology.toJson()Returns a JSON string with the upgrader results.toString()Methods inherited from class ProcessEquipmentBaseClass
addCapacityConstraint, addController, copy, displayResult, equals, getAvailableMargin, getAvailableMarginPercent, getBottleneckConstraint, getCapacityConstraints, getConditionAnalysisMessage, getConstraintEvaluationReport, getController, getController, getControllers, getEffectiveCapacityFactor, getEnergyStream, getEntropyProduction, getExergyChange, getFailureMode, getMassBalance, getMassBalance, getMaxUtilization, getMaxUtilizationPercent, getMechanicalDesign, getMinimumFlow, getPressure, getPressure, getProperty, getReferenceDesignation, getReport_json, getResultTable, getSpecification, getTemperature, getTemperature, getThermoSystem, getUtilizationSummary, hashCode, initElectricalDesign, initializeDefaultConstraints, initInstrumentDesign, initMechanicalDesign, isActive, isActive, isCapacityAnalysisEnabled, isCapacityExceeded, isFailed, isHardLimitExceeded, isNearCapacityLimit, isSetEnergyStream, reportResults, restoreFromFailure, run_step, runConditionAnalysis, setCapacityAnalysisEnabled, setController, setEnergyStream, setEnergyStream, setFailureMode, setFlowValveController, setMinimumFlow, setPressure, setReferenceDesignation, setRegulatorOutSignal, setSpecification, setTemperature, simulateDegradedOperation, simulateTrip, solved, toJsonMethods inherited from class SimulationBaseClass
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTimeMethods inherited from class NamedBaseClass
getName, getTagNumber, setName, setTagNumberMethods inherited from interface NamedInterface
getName, getTagName, getTagNumber, setName, setTagName, setTagNumberMethods inherited from interface ProcessEquipmentInterface
getCapacityDuty, getCapacityMax, getElectricalDesign, getEquipmentState, getExergyChange, getExergyDestruction, getExergyDestruction, getFluid, getInstrumentDesign, getOperatingEnvelopeViolation, getOutletFlowRate, getOutletPressure, getOutletTemperature, getReferenceDesignationString, getRestCapacity, getSimulationValidationErrors, isSimulationValid, isWithinOperatingEnvelope, needRecalculation, validateSetupMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run, run_step, runTransient, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTime
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
private static final org.apache.logging.log4j.Logger loggerLogger instance. -
inletStream
Inlet raw biogas stream. -
technology
Upgrading technology. -
co2RemovalEfficiency
private double co2RemovalEfficiencyCO2 removal efficiency override (NaN = use technology default). -
methaneRecovery
private double methaneRecoveryMethane recovery override (NaN = use technology default). -
h2sRemovalEfficiency
private double h2sRemovalEfficiencyH2S removal efficiency override (NaN = use technology default). -
specificEnergyKWhPerNm3
private double specificEnergyKWhPerNm3Specific energy override in kWh/Nm3 (NaN = use technology default). -
outletPressureBara
private double outletPressureBaraTarget outlet pressure for biomethane in bara. -
biomethaneOutStream
Upgraded biomethane (methane-rich) outlet stream. -
offgasOutStream
Off-gas (CO2-rich) outlet stream. -
biomethaneMethanePercent
private double biomethaneMethanePercentMethane content in biomethane product (vol%). -
biomethaneCO2Percent
private double biomethaneCO2PercentCO2 content in biomethane product (vol%). -
wobbeIndex
private double wobbeIndexWobbe index of biomethane product in MJ/Nm3. -
energyConsumptionKW
private double energyConsumptionKWEnergy consumption in kW. -
methaneSlipPercent
private double methaneSlipPercentMethane slip to off-gas as percent of inlet methane. -
rawBiogasFlowNm3PerHr
private double rawBiogasFlowNm3PerHrRaw biogas flow rate in Nm3/hr. -
biomethaneFlowNm3PerHr
private double biomethaneFlowNm3PerHrBiomethane product flow rate in Nm3/hr. -
hasRun
private boolean hasRunWhether the upgrader has been run.
-
-
Constructor Details
-
BiogasUpgrader
Creates a biogas upgrader with the given name.- Parameters:
name- equipment name
-
BiogasUpgrader
Creates a biogas upgrader with the given name and inlet stream.- Parameters:
name- equipment nameinletStream- the raw biogas inlet stream
-
-
Method Details
-
setInletStream
Sets the inlet raw biogas stream.- Parameters:
stream- the inlet stream
-
getInletStream
-
setTechnology
Sets the upgrading technology.- Parameters:
tech- the upgrading technology
-
getTechnology
Gets the upgrading technology.- Returns:
- upgrading technology
-
setCO2RemovalEfficiency
public void setCO2RemovalEfficiency(double efficiency) Sets the CO2 removal efficiency override.- Parameters:
efficiency- CO2 removal efficiency (0-1)
-
setMethaneRecovery
public void setMethaneRecovery(double recovery) Sets the methane recovery override.- Parameters:
recovery- methane recovery (0-1)
-
setH2SRemovalEfficiency
public void setH2SRemovalEfficiency(double efficiency) Sets the H2S removal efficiency override.- Parameters:
efficiency- H2S removal efficiency (0-1)
-
setSpecificEnergy
public void setSpecificEnergy(double energy) Sets the specific energy consumption override in kWh per Nm3 raw biogas.- Parameters:
energy- specific energy in kWh/Nm3
-
setOutletPressure
public void setOutletPressure(double pressureBara) Sets the target outlet pressure for the biomethane stream in bara.- Parameters:
pressureBara- outlet pressure in bara
-
getBiomethaneOutStream
Returns the upgraded biomethane outlet stream.- Returns:
- biomethane outlet stream, or null if not yet run
-
getOffgasOutStream
Returns the off-gas (CO2-rich) outlet stream.- Returns:
- off-gas outlet stream, or null if not yet run
-
getBiomethaneMethanePercent
public double getBiomethaneMethanePercent()Returns the methane content of the biomethane product as volume percent.- Returns:
- methane content in vol%
-
getBiomethaneCO2Percent
public double getBiomethaneCO2Percent()Returns the CO2 content of the biomethane product as volume percent.- Returns:
- CO2 content in vol%
-
getWobbeIndex
public double getWobbeIndex()Returns the Wobbe index of the biomethane product in MJ/Nm3.- Returns:
- Wobbe index
-
getEnergyConsumptionKW
public double getEnergyConsumptionKW()Returns the energy consumption of the upgrading process in kW.- Returns:
- energy consumption in kW
-
getMethaneSlipPercent
public double getMethaneSlipPercent()Returns the methane slip to the off-gas as a percentage of inlet methane.- Returns:
- methane slip in percent
-
getRawBiogasFlowNm3PerHr
public double getRawBiogasFlowNm3PerHr()Returns the raw biogas volumetric flow rate in Nm3/hr.- Returns:
- raw biogas flow rate
-
getBiomethaneFlowNm3PerHr
public double getBiomethaneFlowNm3PerHr()Returns the biomethane product volumetric flow rate in Nm3/hr.- Returns:
- biomethane flow rate
-
getInletStreams
Returns all inlet streams connected to this equipment. Subclasses override to report their specific inlets. Used by graph builders, DEXPI export, and auto-instrumentation to discover topology withoutinstanceofchecks.- Returns:
- unmodifiable list of inlet streams (empty by default)
-
getOutletStreams
Returns all outlet streams produced by this equipment. Subclasses override to report their specific outlets. Used by graph builders, DEXPI export, and auto-instrumentation to discover topology withoutinstanceofchecks.- Returns:
- unmodifiable list of outlet streams (empty by default)
-
run
Runs the biogas upgrader simulation.Applies technology-specific removal efficiencies to selectively split inlet biogas components into a methane-rich biomethane stream and a CO2-rich off-gas stream. Both outlet streams are flashed at the outlet conditions.
- Parameters:
id- UUID for this run
-
calculateQualityMetrics
private void calculateQualityMetrics(SystemInterface biomethaneFluid, double ch4Recovery, double energyPerNm3) Calculates biomethane quality metrics after the split.- Parameters:
biomethaneFluid- the biomethane fluid systemch4Recovery- the methane recovery usedenergyPerNm3- specific energy consumption in kWh/Nm3
-
getMoleFractionPercent
Returns the mole fraction of a component as a percentage.- Parameters:
fluid- the fluid systemcomponentName- component name- Returns:
- mole fraction in percent (0-100)
-
getResults
-
toJson
Returns a JSON string with the upgrader results.- Specified by:
toJsonin interfaceProcessEquipmentInterface- Overrides:
toJsonin classProcessEquipmentBaseClass- Returns:
- JSON results string
-
toString
-