Skip to content

Building Function

manny kung edited this page Jan 18, 2024 · 10 revisions

Building Function

Revised : 17 Jan 2024

The idea of a "Function" for a building is central to mars-sim.

A building can have one or multiple functions.

As of v3.7.1, there is a total of 31 available FunctionType(s) :

FunctionType
ADMINISTRATION
ALGAE_FARMING
ASTRONOMICAL_OBSERVATIONS
BUILDING_CONNECTION
COMMUNICATION
COMPUTATION
COOKING
DINING
EARTH_RETURN
EVA
EXERCISE
FARMING
FISHERY
FIELD_STUDY*
FOOD_PRODUCTION
VEHICLE_MAINTENANCE
LIFE_SUPPORT
LIVING_ACCOMMODATIONS
MANAGEMENT
MANUFACTURE
MEDICAL_CARE
POWER_GENERATION
POWER_STORAGE
PREPARING_DESSERT
RECREATION
RESEARCH
RESOURCE_PROCESSING
ROBOTIC_STATION
STORAGE
THERMAL_GENERATION
THERMAL_STORAGE
WASTE_DISPOSAL**

Note * : NOT implemented yet.

Note **: only partially implemented.

These functions are defined in FunctionType class and are listed under its attribute tag for each building in buildings.xml.

The COOKING function is implemented under the cooking attribute tag as follows :

 <cooking capacity="2">
    <activity>
      <activity-spot xloc="3.13" yloc="-1.02" />
      <activity-spot xloc="2.8" yloc="-1.35" />
    </activity>
 </cooking>

In mars-sim, each resource process has well-defined input and output resources.

In the resource-processing attribute tag being used in some buildings (such as Lander Hab) in buildings.xml, when the name of a resource process is mentioned, one may go to resource_process.xml to see the definition of that process.

In case of the Oxygen Generation System (OGS), the input resource is brine water (H2O) while the output resources are H2 and O2.

	<process name="Oxygen Generation System (OGS)" power-required="0.25" defaultOn="true">
	<description> 
	
		Oxygen Generation System can split water into H2 and O2.
	
		NASA's Oxygen Generation System is designed to generate
		oxygen from 5 to 20 pounds (2.3 to 9 kg) of oxygen per day
		during continuous operation and a normal rate of 12 pounds
		(5.4 kg) of oxygen per day during cyclic operation.
	
		The Oxygen Generation System will accommodate the testing
		of an experimental Carbon Dioxide Reduction Assembly
		(CReA). Once deployed, the reduction assembly will cause
		hydrogen produced by the Oxygen Generation Assembly to
		react with carbon dioxide removed from the cabin atmosphere
		to produce water and methane.
	
		Oxygen Generator Assembly (OGA) uses 1312 W of power.
	
		Available water electrolysis units using solid polymer
		electrolytes are highly efficient (>90%) and extremely rugged,
		as they have been designed for nuclear submarine use with
		specifications that include resistance to depth charge attack,
		per Zubrin, et al.
	
		During normal operations on the ISS, approximately 23 L water
		per day is used by the OGS with a constant current of 50 ampere
		to each electrolytic cell in the OGS system
	
		2H2O -> 2H2 + O2
	
		2H2O : 36 g/mol
		2H2 : 4 g/mol
		O2 : 32 g/mol
	
		50A * 120 = 6kW
	
		We assume by use of nanosheet and synthesizing appropriate electrocatalyst, 
		a much lower power usage of 125W system is required for splitting 18 kg water 
		into 2 kg H2 and 16 kg O2.
		
		Reference: 
		1. https://www.nasa.gov/centers/marshall/pdf/104840main_eclss.pdf
		2. https://www.quora.com/How-is-oxygen-generated-on-the-ISS
		3. https://www.nasa.gov/pdf/570243main_OxygenGen_CHEM_ST.pdf
		4. https://www.sciencedaily.com/releases/2021/03/210317141722.htm
		5. https://www.researchgate.net/publication/265608781_Decoupled_catalytic_hydrogen_evolution_from_a_molecular_metal_oxide_redox_mediator_in_water_splitting
		
	</description> 
		<input resource="brine water" rate="72"  />
		
		<output resource="hydrogen" rate="8"  />
		<output resource="oxygen" rate="64"  />
	</process>

Note that certain parameters such as the consumption and production rate [in kg/sol], the power usage [in kW] requirement, etc. for a resource process are being modeled.

Clone this wiki locally