Planetary Fluxes

From krc
(Difference between revisions)
Jump to: navigation, search
(Noticeable Diurnal Temperatures Cycle (Mars, Pluto, etc.))
Line 65: Line 65:
 
EXAMPLE HERE. NOT SURE HOW TO DO THIS HERE.
 
EXAMPLE HERE. NOT SURE HOW TO DO THIS HERE.
  
 
+
Davinci function krc_planetary_flux_table(IR,Vis,Lon_Hr)
 
+
DaVinci function krc_planetary_flux_porb(porb,porb_Planet,Lon_Hr)
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
printf("\nKRC supports Eclipses but requires the following parameters\n")
+
    printf("PFlux = forces a planetary flux on a orbiting body (Default = \"F\") \n")
+
printf("    Needs the following Parameters (Default Provided for common bodies)\n")
+
printf("            BT_Avg    : Average Brightness Temperature [K] \n")
+
printf("            BT_Min    : Min Brightness Temperature, if diurnal cycle [K] \n")
+
printf("            BT_Max    : Max Brightness Temperature [K] \n")
+
printf("            Dis_AU    : Distance form Sun in AU \n")
+
printf("            Geom_alb  : Geometric Albedo [1]\n")
+
printf("            Mut_Period : Mutual Period [?]\n")
+
printf("            Orb_Radius : Orbiting Radius [km] \n")
+
printf("            Radius    : Radius of the Obiting body [km] \n")
+
printf("            Lon_Hr    : Longitude Hour of the surface point \n")
+
    printf("    OR: \n")
+
printf("            IR        : A 2 x n x 1 array with IR flux (1st col.) vs. LTST (2nd col.) \n")
+
printf("            Vis       : A 2 x n x 1 array with Vis flux (1st col.) vs. LTST (2nd col.) \n")
+
 
+
 
+
define krc_planetary_flux_porb(porb,porb_Planet,Lon_Hr){
+
 
+
if($ARGC == 0){
+
    printf (" Generates the change card for planetary heat loads in KRC \n")
+
    printf (" $1: porb for the satellite \n")
+
    printf (" $2: porb for the main body (planet) \n")
+
    printf (" $3: Lon_Hr, Longitude Hour of the surface point \n")
+
}
+
 
+
pi            = 3.14159
+
    #porb=load("/Applications/davinci.app/Contents/Resources/library/script_files/krc_support/porb_defaults/Mars_Phobos.porb.hdf")
+
#porb_Planet=load("/Applications/davinci.app/Contents/Resources/library/script_files/krc_support/porb_defaults/Mars_Mars.porb.hdf")
+
+
porb          = $1
+
porb_Planet    = $2
+
Data_Plan      = porb_Planet.planet_flux                                                  #Gets satellites data
+
Data_Sat      = porb.planet_flux                                                        #Gets planet data
+
Lon_Hr        = $3                                                                      #Longitude Hour
+
 
+
Radiance      = 5.56E-8 * float(Data_Plan.BT_Avg)^4                                      #Calculates Average Radiance from Planet
+
Min_Rad        = 5.56E-8 * float(Data_Plan.BT_Min)^4                                      #Calculates the Min Radiance from Planet
+
Max_Rad        = 5.56E-8 * float(Data_Plan.BT_Max)^4                                      #Calculates the Max Radiance from Planet
+
Delta_Radiance = 5.56E-8 * (float(Data_Plan.BT_Max)^4 - float(Data_Plan.BT_Min^4))        #Calculates Max - Min Radiance form Planet
+
Plan_Ang_Surf  = pi*((360./pi)*atan(Data_Plan.Radius/(2*Data_Sat.Orb_Radius)))^2/3282.80635#Angular Surface of Planet
+
IR_Flux        = Radiance * Plan_Ang_Surf/pi                                              #IR Flux from Planet on Satellite
+
IR_Half_Amp    = (Radiance - Min_Rad ) * Plan_Ang_Surf * 0.5 / pi                        #1/2 Amplitude
+
IR_Phase_Lag  = 0.                                                                      #Will need to Look at that for Eclipses
+
Vis_Flux_Peak  = Data_Plan.Geom_alb * 1361./(Data_Plan.Dis_AU^2) * Plan_Ang_Surf          #Peak Visible Flux from Planet
+
Vis_Flux      = 0.5 * Vis_Flux_Peak                                                      #Average Visible Flux from the planet
+
Vis_Half_Amp  = Vis_Flux                                                                #Most often 0.
+
Vis_Phase_Lag  = 0.                                                                      #Will need to Look at that for Eclipses
+
 
+
line = sprintf("15 %.2f %.2f %.2f %.2f %.2f %.2f %.2f / Forcing from Planet on Satellite",IR_Flux,IR_Half_Amp,IR_Phase_Lag,Vis_Flux,Vis_Half_Amp,Vis_Phase_Lag,Lon_Hr)
+
return(line)
+
}
+
 
+
 
+
 
+
define krc_planetary_flux_table(IR,Vis,Lon_Hr){
+
#05/17/2018: Fixes issue with average fluxes definition (HHK email of 05/07/2018)
+
 
+
if($ARGC == 0){
+
    printf (" Generates the change card for planetary heat loads in KRC \n")
+
    printf (" $1: IR array vs LTST (2xnx1)\n")
+
    printf (" $2: Vis array vs LTST (2xnx1)\n")
+
    printf (" $3: Lon_Hr, Longitude Hour of the surface point \n")
+
}
+
 
+
pi            = 3.14159
+
IR_1          = $1
+
IR            = IR_1[1,,1]                                                                #IR array, y axis
+
LTST_IR      = IR_1[2,,1]                                                                #LTST for the IR array, y axis
+
Vis_1        = $2
+
Vis          = Vis_1[1,,1]                                                              #Vis array, y axis
+
LTST_Vis      = Vis_1[2,,1]                                                              #LTST for the Vis array, y axis
+
Lon_Hr        = $3                                                                        #Longitude Hour
+
+
Peak_IR      = maxpos(IR,showval=1)
+
Min_IR        = minpos(IR,showval=1)
+
LTST_IR_Peak  = LTST_IR[1,int(Peak_IR[2,1,1]),1]                                          #int(Peak_IR[2,1,1]) is the index
+
Half_Amp_IR  = 0.5*(Peak_IR[4]-Min_IR[4])
+
Phase_IR      = 360.*LTST_IR_Peak/24.                                                    #in degree
+
IR_KRC        = Min_IR[4] + Half_Amp_IR * (1 + cosd(360.*LTST_IR/24. - Phase_IR))
+
#labelxy("LTST","Flux")
+
#plot(IR,"IR",Xaxis=LTST_IR,IR_KRC)
+
+
+
Peak_Vis      = maxpos(Vis,showval=1)
+
Min_Vis        = minpos(Vis,showval=1)
+
LTST_Vis_Peak  = LTST_Vis[1,int(Peak_Vis[2,1,1]),1]                                      #int(Peak_IR[2,1,1]) is the index
+
Half_Amp_Vis  = 0.5*(Peak_Vis[4]-Min_Vis[4])
+
Phase_Vis      = 360.*LTST_Vis_Peak/24.                                                  #in degree
+
Vis_KRC        = Min_Vis[4] + Half_Amp_Vis * (1 + cosd(360.*LTST_Vis/24. - Phase_Vis))
+
#plot(Vis,"Vis",Xaxis=LTST_Vis,Vis_KRC)
+
+
Vis_Flux      = Min_Vis[4]  + Half_Amp_Vis                                                #Average solar Flux
+
Vis_Half_Amp  = Half_Amp_Vis                                                              #Visible Half Amplitude
+
Vis_Phase_Lag = Phase_Vis                                                                #Vis Phase Lag in degrees
+
IR_Flux      = Min_IR[4]  + Half_Amp_IR                                                  #Average Thermal Emission
+
IR_Half_Amp  = Half_Amp_IR                                                              #IR Half Amplitude
+
IR_Phase_Lag  = Phase_IR                                                                  #IR Phase Lag in degrees
+
+
line = sprintf("15 %.2f %.2f %.2f %.2f %.2f %.2f %.2f / Forcing from Planet on Satellite",IR_Flux,IR_Half_Amp,IR_Phase_Lag,Vis_Flux,Vis_Half_Amp,Vis_Phase_Lag,Lon_Hr) #IR, then Vis   
+
return(line)
+
}
+

Revision as of 14:23, 15 January 2019

Incoming visible and IR fluxes contributed by nearby bodies can be specified, for example Mars shine on Phobos, or Jupiter shine on Europa. Set:

PFlux = "T"
Lon_Hr = [0-24]

in KRC, fluxes take the form of sin functions characterized by various nonintuitive parameters (see helplist).

The DaVinci interface generates these parameters and feed them to KRC from default parameters or user-defined values. In both cases, various assumptions and fits are performed.

While the incoming visible flux is generally straightforward to calculate, the incoming IR flux can be more complex to determine for bodies with strong diurnal temperature variations (like Mars, unlike Jupiter for example).


Fixed Diurnal Temperatures (Jupiter, Saturn, Uranus, Neptune, etc.)

This case applies to satellites revolving around gas giants, or low diurnal contrast bodies (Venus, if it had satellites) etc. The IR flux is only a function of the solid angle of the emitting body. The visible flux follows a sin function over the course of a day. Fewest assumptions used.

The simplest approach consist in using default builtin values from the KRC support files:

OUT  = krc(lat = 0., INERTIA = 70., body = "Jupiter,Europa", bodytype = "minor", ALBEDO = 0.55, PFlux = "T", Lon_Hr = 12., LKofT = "F")

But any input value can be forced:

BT_Avg  : Average Brightness Temperature [K]
BT_Min  : Min Brightness Temperature, if diurnal cycle [K]
BT_Max  : Max Brightness Temperature [K]
Dis_AU  : Distance from Sun in AU
Geom_alb  : Geometric Albedo [1]
Mut_Period : Mutual Period [?]
Orb_Radius : Orbiting Radius [km]
Radius  : Radius of the Orbiting body [km]
Lon_Hr  : Longitude Hour of the surface point (see above)
OUT = krc(lat = 0., INERTIA = 70., body = "Jupiter,Europa", bodytype = "minor", ALBEDO = 0.55, PFlux = "T", BT_Avg = 127., BT_Min = 127., BT_Max = 127., Dis_AU = 5.203, Geom_alb = 0.52, Mut_Period = 3.55, Orb_Radius = 670900, Radius = 670900, Lon_Hr = 12., LKofT = "F")


Noticeable Diurnal Temperatures Cycle (Mars, Pluto, etc.)

This case applies to satellites revolving around planets experienced pronounced diurnal cycles like Phobos around Mars. The IR flux is not only a function of the solid angle of the emitting body, but also a function of the local time of the emitting body.

The IR and visible fluxes are modeled by fitting a sin wave through the max and min radiance values, and KRC accepts parameters describing these two sin functions (IR, and VIS).

EXAMPLE HERE. NOT SURE HOW TO DO THIS HERE.


The IR and visible fluxes are derived elsewhere, and fit with a sin function.
Buffer      = ascii("~/Google Drive/THEMIS_PHOBOS/09_29_2017/67.1_AvgFluxes.txt",format=float)
Vis         = cat(Buffer[3,,1]+00,(Buffer[1,,1]+00.)%24.,axis=x)                          #Potential Bug with the IR flux? => Check this 
IR          = cat(Buffer[2,,1]+65,(Buffer[1,,1]+00.)%24,axis=x)
Lon_Hr      = 12.
test        = krc_planetary_flux_table(IR,Vis,Lon_Hr)
test_T      = krc(INERTIA=35.,lat=10.,lon=0.,body="Mars,Phobos",bodytype="minor",ls=Ls,PFlux="T",Lon_Hr=Lon_Hr,IR=IR,Vis=Vis,ALBEDO=Alb,EMISS=EMIS)
Time        = (test_T.time + 12.) % 24.
plot(test_T.tsurf[,1,1],xaxis=Time)

EXAMPLE HERE. NOT SURE HOW TO DO THIS HERE.

Davinci function krc_planetary_flux_table(IR,Vis,Lon_Hr) DaVinci function krc_planetary_flux_porb(porb,porb_Planet,Lon_Hr)

Personal tools