From a3999494fc91cd339e03fb6740d8490abb8230e8 Mon Sep 17 00:00:00 2001 From: Yann Gaillard Date: Tue, 11 Feb 2025 13:54:49 +0100 Subject: [PATCH] Adapt the termal boundary conditions The changes to the termal boundary conditions enabes the uses of 100 coefficient of spherical harmonics. Also the set of mode l=0 and m=0 automatically to 1 is commented out, since this affects the BC set. Now the thermal BC s_top and s_bot need to be defined precisely. --- src/init_fields.f90 | 2 +- src/preCalculations.f90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/init_fields.f90 b/src/init_fields.f90 index 8ba4e97b..7c2eb99e 100644 --- a/src/init_fields.f90 +++ b/src/init_fields.f90 @@ -62,7 +62,7 @@ module init_fields real(cp), public :: amp_s1,amp_s2,amp_v1,amp_b1,amp_xi1,amp_xi2 !----- Entropy at CMB and ICB (input): - integer, public, parameter :: n_s_bounds=20 + integer, public, parameter :: n_s_bounds=100 real(cp), public :: s_bot(4*n_s_bounds) ! input variables for tops,bots real(cp), public :: s_top(4*n_s_bounds) complex(cp), public, allocatable :: tops(:,:) diff --git a/src/preCalculations.f90 b/src/preCalculations.f90 index 38468bd3..d0a6ec0e 100644 --- a/src/preCalculations.f90 +++ b/src/preCalculations.f90 @@ -413,7 +413,7 @@ subroutine preCalc(tscheme) botconduc = rho0(n_r_max)*kappa(n_r_max)*temp0(n_r_max) end if - if ( ktops == 1 .and. kbots == 1 ) then ! Fixed entropy + if ( ktops == 1 .and. kbots == 1 .and. ( tops(0,0) == 0.0_cp .and. bots(0,0) == 0.0_cp )) then ! Fixed entropy tops(0,0)=0.0_cp bots(0,0)=sq4pi