boriskaus / MagmaThermoKinematics.jl

Package to simulate the thermal evolution of magmatic systems
MIT License
15 stars 3 forks source link

Support for multiple phases #4

Closed albert-de-montserrat closed 2 years ago

albert-de-montserrat commented 2 years ago

The 2D example now runs for multiple phases such as:

phase1 = SetMaterialParams(
        Name = "Rock", 
        Phase = 1, 
        Density = ConstantDensity(ρ=2800kg/m^3),               
        HeatCapacity = ConstantHeatCapacity(cp=1050J/kg/K),
        Conductivity = ConstantConductivity(k=1.5Watt/K/m),       
        LatentHeat = ConstantLatentHeat(Q_L=350e3J/kg),
        Melting = MeltingParam_Caricchi()
    )

    phase2 = SetMaterialParams(
        Name = "Rock", 
        Phase = 2, 
        Density = Compressible_Density(ρ0=2700kg/m^3),               
        HeatCapacity = ConstantHeatCapacity(cp=1050J/kg/K),
        Conductivity = ConstantConductivity(k=1.5Watt/K/m),       
        LatentHeat = ConstantLatentHeat(Q_L=350e3J/kg),
        Melting = MeltingParam_Caricchi()
    )

    # Set material parameters                                       
    MatParam                = (phase1, phase2) 
boriskaus commented 2 years ago

Thanks a lot - great!