Commit 31360ea3 authored by Lena Privat Laptop's avatar Lena Privat Laptop
Browse files

Updates mostly in python for Ortenzy and Exoplanet-Core studies

parent 48ca32e2
......@@ -11,8 +11,8 @@ p_lid = 100; % in bar
T_lid = 1300 + 273.15; % in K
% solubility calculated from Iacono-Marzian et al., 2012; H2O in wt-% and CO2 in wt-ppm
X_H2O = 0.1;%0.4;%0.1; %weight percent of water in the melt
X_CO2 = 600;%4000; %600; %weight ppm of CO2 in the melt
X_H2O = 0.01;%0.1;%0.4;%0.1; %weight percent of water in the melt
X_CO2 = 10000;%600;%4000; %600; %weight ppm of CO2 in the melt
if (X_H2O<4) % personal communication with Fabrice Gaillard
hydrous=0;
......@@ -67,13 +67,29 @@ do
i=i+1;
until ((abs(H2O_dissolved-H2O_dissolved_old)<tol && abs(CO2_dissolved-CO2_dissolved_old)<tol) || (i>i_max))
if (i>i_max)
fprintf('Warning, iteration stopped after %d iterations at p=%f bar!\n',i,p_lid)
endif
%if (i>i_max)
% fprintf('Warning, iteration stopped after %d iterations at p=%f bar!\n',i,p_lid)
%endif
CO2_diss(p_i) = 1-dX_CO2/X_CO2;
H2O_diss(p_i) = 1-dX_H2O/X_H2O;
end
semilogx(10.^(ln_p),CO2_diss,'r-',10.^(ln_p),H2O_diss,'b-')
\ No newline at end of file
graphics_toolkit gnuplot
f = figure('visible','off');
semilogx(10.^(ln_p),CO2_diss,'r-',10.^(ln_p),H2O_diss,'b-')
set (findall (gcf (), '-property', 'fontsize'), 'fontsize', 20);
set (findall (gcf (), '-property', 'linewidth'), 'linewidth', 5);
title(sprintf(strcat('Melt (ppm): X_{H2O}=',num2str(X_H2O*10000,"%4.0f"),'; X_{CO2}=',num2str(X_CO2,"%4.0f"))),'FontSize',30)
%title(sprintf(strcat('Melt: X_{H2O}=',num2str(X_H2O,"%4.3f"),'; X_{CO2}=',num2str(X_CO2/10000.0,"%4.3f"),' wt-%%')),'FontSize',24)
xlabel('Total pressure in bar','FontSize',28)
ylabel('Abundance of volatiles dissolved in melt','FontSize',28)
filename=sprintf(strcat('C:/OwnCloud_FUB/Literature_Projects/Eigene_Projekte/Project_Ortenzi_Dorn/Solubility/',...
'Solubility_H2O_',num2str(X_H2O*10000,'%4.0f'),'_CO2_',num2str(X_CO2,'%4.0f'),'.png'),f);
print(filename,'-dpng','-S800,800');
clear f;
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {},
"outputs": [
{
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment