/// <summary> /// This sets the spectral type of our star. /// </summary> public virtual void setSpectralType() { if (this.evoLine.findCurrentAgeGroup(this.starAge) == StarAgeLine.RET_MAINBRANCH) { this.specType = Star.getStellarTypeFromMass(this.currMass) + " V"; } if (this.evoLine.findCurrentAgeGroup(this.starAge) == StarAgeLine.RET_SUBBRANCH) { this.specType = Star.getStellarTypeFromTemp(this.currMass) + " IV"; } if (this.evoLine.findCurrentAgeGroup(this.starAge) == StarAgeLine.RET_GIANTBRANCH) { this.specType = Star.getStellarTypeFromTemp(this.currMass) + " II"; } //the fun one - white dwarf if (this.evoLine.findCurrentAgeGroup(this.starAge) == StarAgeLine.RET_COLLASPEDSTAR) { if (this.effTemp >= 1000) { this.specType = "DA"; } if (this.effTemp >= 300 && this.effTemp < 1000) { this.specType = "DB"; } if (this.effTemp < 300) { this.specType = "DC"; } } }
//update temp. public virtual void updateTemp(double effTemp) { if (this.evoLine.findCurrentAgeGroup(this.starAge) == StarAgeLine.RET_SUBBRANCH || this.evoLine.findCurrentAgeGroup(this.starAge) == StarAgeLine.RET_GIANTBRANCH) { this.effTemp = effTemp; this.specType = Star.getStellarTypeFromTemp(this.effTemp); } if (this.evoLine.findCurrentAgeGroup(this.starAge) == StarAgeLine.RET_MAINBRANCH) { this.effTemp = effTemp; } }