Class BioprocessRunner

java.lang.Object
neqsim.mcp.runners.BioprocessRunner

public class BioprocessRunner extends Object
Stateless bioprocessing runner for MCP integration.

Supports four reactor types: anaerobic digestion, fermentation, biomass gasification, and pyrolysis. Each takes feedstock parameters and returns process outputs (biogas, syngas, bio-oil, char yields, energy recovery, etc.).

Version:
1.0
Author:
Even Solbraa
  • Field Details

    • GSON

      private static final com.google.gson.Gson GSON
  • Constructor Details

    • BioprocessRunner

      private BioprocessRunner()
      Private constructor — all methods are static.
  • Method Details

    • run

      public static String run(String json)
      Runs a bioprocess simulation from a JSON input.

      The "reactorType" field determines which reactor is used:

      • "anaerobicDigester" — biogas production from organic waste
      • "fermentation" — microbial fermentation (ethanol, etc.)
      • "gasifier" — thermochemical biomass gasification to syngas
      • "pyrolysis" — thermal decomposition to char, bio-oil, gas
      Parameters:
      json - the JSON bioprocess specification
      Returns:
      a JSON string with bioprocess results
    • runAnaerobicDigestion

      private static String runAnaerobicDigestion(com.google.gson.JsonObject input)
      Runs an anaerobic digestion simulation.
      Parameters:
      input - the JSON input
      Returns:
      the results as JSON
    • runFermentation

      private static String runFermentation(com.google.gson.JsonObject input)
      Runs a fermentation reactor simulation.
      Parameters:
      input - the JSON input
      Returns:
      the results as JSON
    • runGasification

      private static String runGasification(com.google.gson.JsonObject input)
      Runs a biomass gasification simulation.
      Parameters:
      input - the JSON input
      Returns:
      the results as JSON
    • runPyrolysis

      private static String runPyrolysis(com.google.gson.JsonObject input)
      Runs a pyrolysis reactor simulation.
      Parameters:
      input - the JSON input
      Returns:
      the results as JSON
    • errorJson

      private static String errorJson(String code, String message, String remediation)
      Creates a standard error JSON string.
      Parameters:
      code - the error code
      message - the error message
      remediation - the fix suggestion
      Returns:
      the error JSON string