added column width rad/T
added diffusion constants
This commit is contained in:
@ -280,3 +280,38 @@ def position(request):
|
||||
"div_table": div_table})
|
||||
|
||||
|
||||
def diff(c1, c2, temp_Kelvin):
|
||||
return 1e-9*np.exp(c1+c2*1000/temp_Kelvin)
|
||||
|
||||
def diffusion(request):
|
||||
standard = request.GET.get("standard")
|
||||
temperature = float(request.GET.get("temperature"))
|
||||
if standard == "h2o":
|
||||
diffusion_constant = 1.635e-8*(temperature/215.05-1)**2.063
|
||||
standard_name = "H<sub>2</sub>O"
|
||||
elif standard == "tetradecane":
|
||||
diffusion_constant = diff(5.6286, -1.8726, temperature)
|
||||
standard_name = "Tetradecane"
|
||||
elif standard == "cyclohexane":
|
||||
diffusion_constant = diff(5.8765, -1.6477, temperature)
|
||||
standard_name = "Cyclohexane"
|
||||
elif standard == "dioxane":
|
||||
diffusion_constant = diff(5.7064, -1.6754, temperature)
|
||||
standard_name = "Dioxane"
|
||||
elif standard == "dodecane":
|
||||
diffusion_constant = diff(5.3193 , -1.6483, temperature)
|
||||
standard_name = "Dodecane"
|
||||
elif standard == "dmso":
|
||||
diffusion_constant = diff(5.6991 , -1.7927, temperature)
|
||||
standard_name = "DMSO"
|
||||
elif standard == "pentanol":
|
||||
diffusion_constant = diff(8.4847, -2.9018, temperature)
|
||||
standard_name = "Pentanol"
|
||||
|
||||
|
||||
|
||||
|
||||
return render(request, 'diffusion.html', {'standard_name': standard_name,
|
||||
'temperature_kelvin': temperature,
|
||||
'temperature_celsius': temperature-273.15,
|
||||
'diffusion_constant': diffusion_constant})
|
||||
|
Reference in New Issue
Block a user