@@ -359,17 +359,6 @@ bool LumpedRateModelWithPoresDG::configure(IParameterProvider& paramProvider)
359359 // Read geometry parameters
360360 _colPorosity = paramProvider.getDouble (" COL_POROSITY" );
361361
362- // Read vectorial parameters (which may also be section dependent; transport)
363- _filmDiffusionMode = readAndRegisterMultiplexCompTypeSecParam (paramProvider, _parameters, _filmDiffusion, " FILM_DIFFUSION" , _disc.nParType , _disc.nComp , _unitOpIdx);
364-
365- if (paramProvider.exists (" PORE_ACCESSIBILITY" ))
366- _poreAccessFactorMode = readAndRegisterMultiplexCompTypeSecParam (paramProvider, _parameters, _poreAccessFactor, " PORE_ACCESSIBILITY" , _disc.nParType , _disc.nComp , _unitOpIdx);
367- else
368- {
369- _poreAccessFactorMode = MultiplexMode::ComponentType;
370- _poreAccessFactor = std::vector<cadet::active>(_disc.nComp * _disc.nParType , 1.0 );
371- }
372-
373362 // Check whether PAR_TYPE_VOLFRAC is required or not
374363 if ((_disc.nParType > 1 ) && !paramProvider.exists (" PAR_TYPE_VOLFRAC" ))
375364 throw InvalidParameterException (" The required parameter \" PAR_TYPE_VOLFRAC\" was not found" );
@@ -400,11 +389,6 @@ bool LumpedRateModelWithPoresDG::configure(IParameterProvider& paramProvider)
400389 if (_disc.nParType * _disc.nPoints != _parTypeVolFrac.size ())
401390 throw InvalidParameterException (" Number of elements in field PAR_TYPE_VOLFRAC does not match number of particle types" );
402391
403- if ((_filmDiffusion.size () < _disc.nComp * _disc.nParType ) || (_filmDiffusion.size () % (_disc.nComp * _disc.nParType ) != 0 ))
404- throw InvalidParameterException (" Number of elements in field FILM_DIFFUSION is not a positive multiple of NCOMP * NPARTYPE (" + std::to_string (_disc.nComp * _disc.nParType ) + " )" );
405- if (_disc.nComp * _disc.nParType != _poreAccessFactor.size ())
406- throw InvalidParameterException (" Number of elements in field PORE_ACCESSIBILITY differs from NCOMP * NPARTYPE (" + std::to_string (_disc.nComp * _disc.nParType ) + " )" );
407-
408392 // Check that particle volume fractions sum to 1.0
409393 for (unsigned int i = 0 ; i < _disc.nPoints ; ++i)
410394 {
@@ -611,7 +595,7 @@ void LumpedRateModelWithPoresDG::notifyDiscontinuousSectionTransition(double t,
611595 _convDispOp.notifyDiscontinuousSectionTransition (t, secIdx, _jacInlet);
612596
613597 for (int parType = 0 ; parType < _disc.nParType ; parType++)
614- _particle[parType].notifyDiscontinuousSectionTransition (t, secIdx, &_filmDiffusion[ 0 ], &_poreAccessFactor[ 0 ] );
598+ _particle[parType].notifyDiscontinuousSectionTransition (t, secIdx);
615599}
616600
617601void LumpedRateModelWithPoresDG::setFlowRates (active const * in, active const * out) CADET_NOEXCEPT
@@ -1185,7 +1169,7 @@ void LumpedRateModelWithPoresDG::multiplyWithDerivativeJacobian(const Simulation
11851169 // Add derivative with respect to dc_p / dt to Jacobian
11861170 localRet[comp] = localSdot[comp];
11871171
1188- const double invBetaP = (1.0 - static_cast <double >(_particle[type].getPorosity ())) / (static_cast <double >(_poreAccessFactor [type * _disc. nComp + comp]) * static_cast <double >(_particle[type].getPorosity ()));
1172+ const double invBetaP = (1.0 - static_cast <double >(_particle[type].getPorosity ())) / (static_cast <double >(_particle [type]. getPoreAccessfactor ()[ comp]) * static_cast <double >(_particle[type].getPorosity ()));
11891173
11901174 // Add derivative with respect to dq / dt to Jacobian (normal equations)
11911175 for (unsigned int i = 0 ; i < nBound[comp]; ++i)
@@ -1275,10 +1259,6 @@ bool LumpedRateModelWithPoresDG::setParameter(const ParameterId& pId, double val
12751259
12761260 return true ;
12771261 }
1278- if (multiplexCompTypeSecParameterValue (pId, hashString (" FILM_DIFFUSION" ), _filmDiffusionMode, _filmDiffusion, _disc.nParType , _disc.nComp , value, nullptr ))
1279- return true ;
1280- if (multiplexCompTypeSecParameterValue (pId, hashString (" PORE_ACCESSIBILITY" ), _poreAccessFactorMode, _poreAccessFactor, _disc.nParType , _disc.nComp , value, nullptr ))
1281- return true ;
12821262
12831263 const int mpIc = multiplexInitialConditions (pId, value, false );
12841264 if (mpIc > 0 )
@@ -1344,12 +1324,6 @@ void LumpedRateModelWithPoresDG::setSensitiveParameterValue(const ParameterId& p
13441324
13451325 return ;
13461326 }
1347- if (multiplexCompTypeSecParameterValue (pId, hashString (" FILM_DIFFUSION" ), _filmDiffusionMode, _filmDiffusion, _disc.nParType , _disc.nComp , value, &_sensParams))
1348- return ;
1349- if (multiplexCompTypeSecParameterValue (pId, hashString (" PORE_ACCESSIBILITY" ), _poreAccessFactorMode, _poreAccessFactor, _disc.nParType , _disc.nComp , value, &_sensParams))
1350- return ;
1351- if (multiplexInitialConditions (pId, value, true ) != 0 )
1352- return ;
13531327
13541328 if (_convDispOp.setSensitiveParameterValue (_sensParams, pId, value))
13551329 return ;
@@ -1387,18 +1361,6 @@ bool LumpedRateModelWithPoresDG::setSensitiveParameter(const ParameterId& pId, u
13871361 return true ;
13881362 }
13891363
1390- if (multiplexCompTypeSecParameterAD (pId, hashString (" FILM_DIFFUSION" ), _filmDiffusionMode, _filmDiffusion, _disc.nParType , _disc.nComp , adDirection, adValue, _sensParams))
1391- {
1392- LOG (Debug) << " Found parameter " << pId << " : Dir " << adDirection << " is set to " << adValue;
1393- return true ;
1394- }
1395-
1396- if (multiplexCompTypeSecParameterAD (pId, hashString (" PORE_ACCESSIBILITY" ), _poreAccessFactorMode, _poreAccessFactor, _disc.nParType , _disc.nComp , adDirection, adValue, _sensParams))
1397- {
1398- LOG (Debug) << " Found parameter " << pId << " : Dir " << adDirection << " is set to " << adValue;
1399- return true ;
1400- }
1401-
14021364 const int mpIc = multiplexInitialConditions (pId, adDirection, adValue);
14031365 if (mpIc > 0 )
14041366 {
0 commit comments