Skip to content

Commit e3c29b1

Browse files
authored
Merge pull request #50 from gemshub/CCM-model-devel
added option for CCM model where capacitance is sqrt(IS)/alpha
2 parents 5331fff + 0251ee4 commit e3c29b1

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

GEMS3K/ipm_chemical.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ case DC_SCM_SPECIES:
523523
}
524524
}
525525
}
526-
else if( pm.SCM[k][ist] == SC_BSM || pm.SCM[k][ist] == SC_CCM )
526+
else if( pm.SCM[k][ist] == SC_BSM || pm.SCM[k][ist] == SC_CCM || pm.SCM[k][ist] == SC_ISCCM )
527527
{ // Basic Stern model, Christl & Kretzschmar, 1999
528528
// New CD version of TLM added 25.10.2004
529529
if( fabs( CD0 ) > 1e-20 && fabs( CDb ) > 1e-20 )

GEMS3K/ipm_chemical2.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,9 +595,10 @@ void TMultiBase::IS_EtaCalc()
595595
pm.XetaB[k][ist] += pm.X[j]*Ez;
596596
pm.XetaA[k][ist] += pm.X[j]*CD0; // added for testing
597597
}
598-
else if( pm.SCM[k][ist] == SC_CCM )
598+
else if( pm.SCM[k][ist] == SC_CCM || pm.SCM[k][ist] == SC_ISCCM )
599599
{ // Added 25.07.03 to implement the extended CCM Nilsson ea 1996
600600
// New CD version of BSM added 25.10.2004
601+
// 2026 SC_ISCCM uses dependcy of capacity with IS C = sqrt(IS)/alpha, alpha is given instead of capacity
601602
pm.XetaB[k][ist] += pm.X[j] * CDb;
602603
pm.XetaA[k][ist] += pm.X[j] * CD0;
603604
}
@@ -697,6 +698,7 @@ TMultiBase::GouyChapman( long int, long int, long int k )
697698
switch( pm.SCM[k][ist] )
698699
{
699700
case SC_CCM: // Constant-Capacitance Model Schindler, extension Nilsson
701+
case SC_ISCCM: // 2026 SC_ISCCM uses dependcy of capacity with IS C = sqrt(IS)/alpha, alpha is given instead of capacity
700702
SigA = pm.Xetaf[k][ist] + XetaA[ist];
701703
SigDDL = -SigA - XetaB[ist];
702704
SigB = XetaB[ist];
@@ -796,9 +798,13 @@ TMultiBase::GouyChapman( long int, long int, long int k )
796798
pm.XpsiB[k][ist] = PsiD;
797799
break;
798800
case SC_CCM: // Constant-Capacitance Model Schindler, ext. Nilsson
801+
case SC_ISCCM: // 2026 SC_ISCCM uses dependcy of capacity with IS C = sqrt(IS)/alpha, alpha is given instead of capacity
799802
if( pm.XcapB[k][ist] > 0.001 )
800803
{ // Classic CCM Schindler with inner-sphere species only
801-
PsiA = SigA / pm.XcapA[k][ist];
804+
if (pm.SCM[k][ist] == SC_ISCCM)
805+
PsiA = SigA / (sqrt(I)/pm.XcapA[k][ist]);
806+
else
807+
PsiA = SigA / pm.XcapA[k][ist];
802808
if( fabs( PsiA ) > 0.7 ) // truncated 0-plane potential
803809
{
804810
PsiA = PsiA<0? -0.7: 0.7;

GEMS3K/ipm_simplex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void TMultiBase::AutoInitialApproximation( )
5656
for( i=0; i<pm.N; i++)
5757
DU[i+Q] = 0.;
5858
EPS = base_param()->EPS; // 13.10.00 KC DK
59-
GZ = 1./EPS;
59+
GZ = 1./EPS;
6060

6161
T=0; // Calcuation of all non-zero values in A and G arrays
6262
for(i=0;i<pm.L;i++)

GEMS3K/m_const_base.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ enum sorption_control {
253253
// EDL interface models - separate for site types in v. 3.1
254254
SC_DDLM = 'D', SC_CCM = 'C', SC_TLM = 'T', SC_MTL = 'M',
255255
SC_MXC = 'E', SC_NNE = 'X', SC_IEV = 'I', SC_BSM = 'S',
256-
SC_3LM = '3', SC_NOT_USED = 'N',
256+
SC_3LM = '3', SC_NOT_USED = 'N', SC_ISCCM = 'P',
257257

258258
// Methods of Surface Activity Terms calculation
259259
SAT_COMP = 'C', SAT_NCOMP = 'N', SAT_SOLV = 'S', SAT_INDEF = 'I',

0 commit comments

Comments
 (0)