Created
May 18, 2012 21:29
-
-
Save taldcroft/2727687 to your computer and use it in GitHub Desktop.
Xija - defining model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xija | |
# Create Xija model named "dpa" (Digital Processor Assembly) | |
mdl = xija.ThermalModel('dpa') | |
# Add node for DPA temperature 1DPAMZT in telemetry | |
dpamzt = mdl.add(xija.Node, '1dpamzt') | |
simz = mdl.add(xija.SimZ) # Science Instrument Module posn | |
pitch = mdl.add(xija.Pitch) # Sun angle w/r/t spacecraft | |
eclipse = mdl.add(xija.Eclipse) # Eclipse status | |
# Solar heating of the DPA electronics box | |
mdl.add(xija.DpaSolarHeat, dpamzt, pitch_comp=pitch, | |
simz_comp=simz, eclipse_comp=eclipse) | |
# External heat sink (cooling to rest of spacecraft and space) | |
mdl.add(xija.HeatSinkRef, dpamzt) | |
# Self-heating of DPA electronics due to internal power draw | |
mdl.add(xija.AcisDpaStatePower, dpamzt) | |
# Nearby thermostatically controlled proportional heater | |
mdl.add(xija.PropHeater, dpamzt) | |
# After all model components are defined then do a final | |
# "make" step to create arrays and read data as needed. | |
mdl.make() | |
# Write the model to a JSON file for use in fitting | |
mdl.write('dpa_model_spec.json') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment