CONTINUOUS-FLOW EXTRACTION OF BIOCOMPOUNDS IN FIXED BED: INFLUENCE OF SWAPPING FROM DIRICHLET TO DANCKWERTS CONDITION AT INLET IN PHENOMENOLOGICAL MODELS EXTRAÇÃO DE BIOCOMPOSTOS EM FLUXO CONTÍNUO EM LEITO FIXO: INFLUÊNCIA DA TROCA DE CONDIÇÃO DE DIRICHLET PARA DANCKWERTS NA ENTRADA EM MODELOS FENOMENOLÓGICOS EXTRACCIÓN DE BIOCOMPUESTOS A FLUJO CONTINUO EN LECHO FIJO: INFLUENCIA DEL CAMBIO DE CONDICIÓN DE DIRICHLET A DANCKWERTS A LA ENTRADA EN MODELOS FENOMENOLÓGICOS

Phenomenological models have increasingly become vital to bioprocess engineering. In continuous-flow biocompounds extraction models, diffusion requires an extra boundary condition at exit (usually null Neumann condition) while either Dirichlet or Danckwerts condition can be imposed at inlet. By taking an extant case study and with the help of an in-house lattice-Boltzmann simulator, this work numerically examines prospective effects of interchanging aforesaid inlet conditions. Trial simulations were performed for scenarios ranging from convection-dominant to diffusion-dominant. Extraction yields numerically simulated under each inlet condition were compared with experimental data. Expected shape of extraction yield curves was simulated whenever process parameters were properly provided and differences due to switching inlet conditions became evident only in diffusion-dominant extraction scenarios. At diffusivities of order 106 m2 s1, numerical results suggest that Danckwerts boundary condition should be preferred at bed inlet.


BIOCOMPOUNDS EXTRACTION: EXTENDING PHYSICS-BASED MODELS
Computational modeling (sometimes referred to as virtualization) has progressively become strategic for research, development and innovation (RD&I) in food engineering (SAM SAGUY, 2016) as well as in biosystems engineering. Earlier works using numerical simulation have been reviewed for (but not limited to) emissions from livestock buildings (CALVET et al., 2013), crops with agricultural screen (TANNY, 2013), agricultural granular materials (HORABIK; MOLENDA, 2016), and either carbon dioxide control (LI et al., 2018) or ventilation-cooling within greenhouses (GHOULEM et al., 2019).
As far as biocompounds extraction is concerned, virtualization has long supported design, scale-up and optimization from lab to industrial scale (DIAZ; BRIGNOLE, 2009).
Continuous-flow extraction of natural compounds relies on key process parameters (DE OLIVEIRA et al., 2018) and numerical simulation can rapidly examine 'what-if' scenarios towards optimal extraction (BERTOLDI et al., 2021). Recent trends in numerical simulation of biosystems have pointed to combining heuristic techniques (e.g. machine learning) with phenomenological (e.g. multiphysics) models (ALBER et al., 2019).
While mathematical models have long been proposed for biocompounds extraction (SOVOVÁ, 1994;REVERCHON, 1996), they have been constantly evaluated (RAI et al., 2014). As model extensions towards comprehensiveness are vital for process engineering, oversimplifications should be circumvented (DE SOUZA-SANTOS, 2010). Physics-based models should rely on realistic governing differential equations together with suitable initial and/or boundary conditions.
In order to virtualize biosystems and bioprocesses, governing differential equations in IRENE invoke several process parameters, which are input values to be user-supplied.
As IRENE has computationally relied on input parameters taken from the literature (but not necessarily fine-tuned through similar models), values best-fitted against relatively simpler differential equations (e.g. parabolic rather than elliptic) or dissimilar boundary conditions (e.g. Dirichlet instead of Danckwerts) could be conceivably misleading.

BIOCOMPOUNDS EXTRACTION: NUMERICAL EFFECTS OF INLET CONDITIONS
In order to virtualize bioprocesses (e.g. natural compounds extraction), IRENE has originally imposed Dirichlet inlet condition, although Danckwerts inlet condition could be alternatively imposed. Inspired by a previous LBM study (RABI; KAMIMURA, 2016), the present work aimed at examining how those two inlet conditions may influence continuousflow extraction in fixed-bed equipment as numerically simulated via IRENE.
Since its early versions IRENE has considered chemical species (mass) diffusion in distinct phases, thus rendering an elliptic governing differential equation. Mathematically, a 2 nd -order spatial derivative arises to model diffusion so that an extra boundary condition becomes required, usually at exit. From computational viewpoint, 'marching methods' (e.g. Runge-Kutta method) are no longer allowable and they should be replaced by 'iterative sweeping methods' (e.g. spatial discretization methods), which is the case of LBM.
Accordingly, the present work aimed at examining numerical effects in IRENE due to adopting input parameters fine-tuned through extraction models neglecting diffusion. In addition, LBM simulations explored the prospective influence on extraction virtualization as BIOENG, v. 15, n. 4, p. 538-560, 2021. DOI: http://dx.doi.org/10.18011/bioeng2021v15n4p538-560 (i) continuous-flow extraction ranged from convection-dominant to diffusion-dominant and (ii) Dirichlet and Danckwerts boundary conditions were interchanged at bed inlet.
As means to perceive those numerical effects, an extant work on continuous-flow extraction of essential oil from Baccharis trimera (gorse) in fixed-bed equipment (VARGAS et al., 2006) was properly taken as case study. While VARGAS et al. (2006) is relatively dated, it is a suitable mathematical choice to check numerical effects in IRENE because (i) their governing differential equations disregard mass diffusion in fluid phase and (ii) only Dirichlet boundary condition is imposed at bed inlet.

CONTINUOUS-FLOW EXTRACTION IN FIXED BED: PHYSICS-BASED MODELING
In line with VARGAS et al. (2006), the present work follows a dynamic 1-D physicsbased model in which species (namely, essential oil) concentrations are functions of time t and axial position x, respectively indicated as cf = cf(t,x) and cs = cs(t,x) in flowing solvent (fluid phase) and gorse particles (solid phase). Extractor is modeled as stratified cylindrical fixed bed with diameter d and uniform porosity . Stratification axis x is flow-oriented so that bed inlet and exit are respectively at x = 0 and x = L (= bed length). Volumetric flow rate V  of solvent is assumed to remain constant so that interstitial velocity v of flowing solvent results constant and uniform, namely: Let r  be the local instantaneous rate at which essential oil is extracted from gorse particles to the flowing solvent. In VARGAS et al. (2006), such transfer rate is modeled as: where kp and tint are respectively known as partition coefficient and intra-particle diffusion time. The latter is assessed from particle characteristic length lp, particle shape coefficient , and intra-particle diffusivity Dint (of essential oil), as indicated in Eq. (2).
As r  is the instantaneous rate at which gorse particles lose essential oil, it behaves as a sink term with respect to the solid-phase concentration cs and the following governing differential equation then holds: On the other hand, this very same rate r  behaves as a source term with regard to the fluidphase concentration cf. By invoking species transport through convection as well as diffusion in the fluid phase, the following partial differential equation (PDE) applies: where Df is species (i.e. essential oil) diffusivity in the fluid phase (i.e. flowing solvent). VARGAS et al. (2006) disregarded diffusive transport in their governing PDE for essential oil concentration in fluid phase, which is equivalent to impose Df = 0 in Eq. (4). It is precisely this modeling constraint that makes VARGAS et al. (2006) an interesting work for comparison purposes as diffusion has been modeled in IRENE since its early versions (OKIYAMA; RABI, 2013) owing to its relevance in long (i.e. industrial-scale) extraction equipment (GASPAR et al., 2003). For that reason, Df arises as additional input parameter in continuous-flow extraction models, besides those in Table 1 and Table 2.
Table 1 -Extraction of essential oil from gorse: temperature-independent input parameters. Table 2 -Extraction of essential oil from gorse: temperature-dependent input parameters. At process start-up, maximum extraction capacity cmax is uniformly assumed within gorse particles whereas null concentration is assigned throughout the interstitial solvent.

Extraction parameter (symbol, units) at:
Mathematically imposed for 0  x  L at t = 0, those two initial conditions in solid and fluid phases are respectively expressed as: As Eq. (3) explicitly lacks partial derivatives with respect to coordinate x, it needs no boundary conditions. In opposition, two boundary conditions must be invoked to solve Eq.

RATIONALE OF LATTICE BOLTZMANN METHOD (LBM)
LBM treats any macroscopic (i.e. observable) medium, whether solid or fluid, as allegedly comprised by sets of fictitious particles populating a discrete space, namely an equally fictitious lattice structure. During discrete advancing time steps, particle ensembles concurrently stream via lattice links and mutually collide when they simultaneously arrive at lattice sites. Due to those collisions, particle velocities become rearranged for further and iterative streaming-collision (mesoscopic) dynamics. LBM mathematically relies on particle distribution functions Space-time discretization of LBE yields algebraic equations to be solved for functions fk related to particles streaming via link k in the fictitious lattice. For example, the repetitive linear structure of D1Q2 lattice (for 1-D problems) entails a central site linked to one site in forward streaming (k = 1) and one site in backward streaming (k = 2). LBE must then be numerically solved for functions f1 (forward particle ensembles) and f2 (backward particle ensembles). In D1Q2 lattice, consecutive sites are uniformly separated by xk, where x1 = +x is for forward streaming whereas x2 = -x refers to backward streaming. Computationally speaking, IRENE entails a series of in-house (i.e. tailor-made) codes implemented in Fortran; in other words, IRENE is not off-the-shelf (i.e. commercial) software.

NUMERICAL METHOD
Either expressed in primitive or dimensionless variables, governing differential equations (whether or not coupled to each other) are numerically solved through LBM by following code lines and computational routines similar to those in MOHAMAD (2011).

LBM SIMULATION OF DYNAMIC 1-D CONTINUOUS-FLOW EXTRACTION
As this work relies on a dynamic 1-D model, LBM simulations used D1Q2 lattice (k = 1, 2). Particle distribution functions sk = sk(t,x) and fk = fk(t,x) were assigned to essential oil concentrations in solid and fluid phases, respectively. Hence, at any time t and position x in the fixed-bed extractor, those oil concentrations can be retrieved simply as:

LBM COLLISION AND STREAMING STEPS
In LBM, collision is the iterative step that updates all particle distribution functions (sk and fk in this work) from instant t to t + t at every lattice site in the solution domain, where t is the advancing time step. As either source or sink terms can be included at this LBM step, Eqs. (3) and (4) dictated the following implementation of collision step in IRENE: where s and f are referred to as relaxation factors, where Ma = vt/x and Pem = vx/Df are respectively Mach number and mass-transfer Péclet number, both lattice-based (i.e. assessed from LBM parameters t and x).
By recalling that solid phase remains stationary while convective-diffusive transport is contemplated in fluid phase, equilibrium distribution functions were implemented as: When evaluating function eq k f , the sign before Ma is positive for forward streaming (k = 1) or negative for backward streaming (k = 2). Weighting factors wk in Eq. (12) are the same as in Eq. (10), namely w1 = w2 = 1/2 for D1Q2 lattice, as adopted in the present work.
During LBM streaming step, collision outcomes are transported to adjacent lattice sites. As Eq. (3) has no partial derivatives with respect to coordinate x, it was possible to suppress the streaming step for solid-phase particle distribution functions sk with no loss of functionality (OKIYAMA; RABI, 2013). For that reason, streaming step was implemented for fluid-phase particle distribution functions only, namely: With regard to boundary conditions for particle distribution functions in fluid phase, let null Neumann condition at bed exit, Eq. (6), be firstly addressed. As f1(t,L) is obtained via streaming from the adjacent (preceding) site, first-order finite-differences discretization of cf/x together with Eq. (9) leads to (RABI; KAMIMURA, 2016): At bed inlet, f2(t,0) is obtained through streaming from the adjacent (subsequent) site.

RESULTS AND DISCUSSION
Input parameters for LBM simulations were initially those in VARGAS et al. (2006) except for oil diffusivity Df in fluid phase, which was absent in aforesaid case study as their extraction model disregarded diffusion. As stated, it is precisely such model simplification that enabled IRENE to audit eventual numerical effects in LBM simulations not only when extraction ranged from convection-dominant to diffusion-dominant but also when Dirichlet and Danckwerts boundary conditions were interchanged at bed inlet.
One may group those input parameters as temperature-independent (Table 1) or as temperature-dependent (Table 2), with the latter in view of extraction temperatures studied in VARGAS et al. (2006), namely: 40ºC, 50ºC, 60ºC and 70ºC. Using parameters in Table   1 Gorse particles at bed inlet (z = 0) are closer to incoming (thus relatively cleaner) solvent. Hence, they are exposed to larger concentration gradients, thus leading to higher transfer rates of essential oil from gorse particles to incoming supercritical fluid.
In terms of numerical effects in LBM simulations of particles depletion at bed inlet, the following remarks arise: • With input data for extractions at 40C and 50C, simulations were basically the same regardless of fluid-phase diffusivity Df and Dirichlet-Danckwerts inlet conditions. As local depletion (oil transfer rates from particles) were insensitive to extraction scenarios (i.e. convection or diffusion-dominant) as well as inlet condition type, fine-tuned kp-Dint duets in Table 2 for 40C and 50C might be misleading in convection-diffusion models.
• For extractions at 60C and 70C, relatively larger concentration profiles were simulated with Df = 1.0  10 -4 m 2 s-1 (diffusion-dominant extraction) and Danckwerts inlet condition. incoming solvent becomes less 'clean' as Df augments, which decreases concentration gradients between solid and fluid phases, thus reducing transfer rates. On the contrary, there was no significant effect when Dirichlet condition was imposed at bed inlet.
• Final (i.e. at t = 60 min) solid-phase concentrations at inlet were quite lower (i.e. almost local depletion) mainly for convection-dominant extractions at 60C and 70C. This is expected as kp-Dint duets in Table 2 were fine-tuned in a convection-only model.

ESSENTIAL OIL CONCENTRATION IN SUPERCRITICAL FLUID AT BED EXIT
The sequence in Figure 2 shows LBM simulations of the time evolution of essential oil concentration cf,out(t) = cf(t,L) in fluid phase at bed exit. Although experimental data are indeed collected at bed exit, they do not refer to oil concentration itself but rather to time evolution of mass-basis extraction yield, also referred to as extraction kinetics (SOVOVÁ, 1994;REVERCHON, 1996;RAI et al., 2014;DE OLIVEIRA et al., 2018).
As general observation from LBM simulations, relatively large amounts of essential oil are extracted (i.e. leave the extractor) during early instants, evidenced by sudden rise in fluid-phase concentration. As extraction continues, gorse particles become more and more depleted over the bed and, hence, fluid-phase concentration gradually decreases at bed exit. In terms of numerical effects in LBM simulations while in consideration of results in section 4.1, the following remarks arise: • As gorse particles depletion was lower (i.e. particles retained more oil) for extractions simulated at 40C and 50C in Figure 1 • For either Df = 1.0  10 -8 m 2 s -1 (convection-dominant extraction) or Df = 1.0  10 -6 m 2 s -1 (moderate diffusivity) only minor effects (if any) were noted as Dirichlet or Danckwerts boundary conditions were interchanged at bed inlet. This is mathematically expected as Eq. (8) simplifies to Eq. (7) for Df → 0.
• For extractions simulated with Df = 1.0  10 -8 m 2 s -1 (convection-dominant extraction), very sharp concentration peaks occurred at initial instants, which mathematically refer to relatively high (and probably unrealistic) derivatives with respect to time. suggest that Danckwerts inlet condition could be more realistic in convection-diffusion models and should be preferred.
• For LBM simulations with Df = 1.0  10 -4 m 2 s -1 (diffusion-dominant extraction) and under Danckwerts inlet condition, back-diffusion at inlet combined with extracted oil hold-up over the bed might explain relatively higher oil concentrations in fluid phase at exit. as mass-basis extraction yields (extraction kinetics), whose raw data are collected at bed exit (SOVOVÁ, 1994;REVERCHON, 1996;RAI et al., 2014;DE OLIVEIRA et al., 2018).
In view of that, IRENE numerically retrieves time-dependent behavior of mass-basis extraction yield for comparison purposes with extant experimental data. Based on the total mass mtotal of solid particles in the bed, dynamic extraction kinetics profile Y(t) is assessed from fluid-phase concentration cf,out(t) = cf(t,L) simulated at bed exit (x = L) as follows: IRENE numerically evaluates the integral in Eq. (18).
The sequence in Figure 3 compares the time evolution of extraction kinetics from LBM simulations, which can now be compared with experimental data from VARGAS et al. (2006). It is worth noting that IRENE numerically simulates extraction kinetics curves from phenomenological reasoning (i.e. physics-based modeling) rather than heuristically bestfitting 'a priori' dictated piecewise mathematical functions against experimental data.  In terms of numerical effects in simulations while considering results from previous sections (especially from section 4.2, which IRENE used in Eq. (18) to numerically retrieve extraction kinetics dynamic profile), the following remarks arise: • Fine-tuned kp-Dint duets in Table 2 for extractions at 40C and 50C led to dissimilar extraction kinetics as simulated using more comprehensive models, regardless of fluidphase diffusivity Df and inlet condition type. As shown in Figure 2 for simulations with Df = 1.0  10 -4 m 2 s -1 , when Dirichlet and Danckwerts inlet conditions were interchanged, huge differences arose in fluid-phase concentrations cf, which mathematically rendered distinct extraction yields, thus reinforcing that kp-Dint in Table 2 might not be suitable to numerically simulate extractions in diffusion-dominant scenarios.
• For Df = 1.0  10 -4 m 2 s -1 (diffusion-dominant extraction), LBM simulations under Dirichlet inlet condition underestimated extraction kinetics whereas those under Danckwerts inlet condition started to become considerably higher than counterparts when bed depletion instants (i.e. asymptotic extraction yields) were experimentally reached.

(convection-dominant extraction), interchanging Dirichlet and Danckwerts conditions at
bed inlet brought about minor differences, which is expected as Eq. (8)  Those deviations are prone to result from the fact that kp-Dint input duets in Table 2 were formerly fine-tuned in VARGAS et al. (2006)  For simulations in Figure 4, partition coefficient was kept at kp = 0.08 while three values intra-particle diffusivity were tested: Dint = 1.0  10 -10 m 2 s -1 , Dint = 2.0  10 -10 m 2 s -1 and Dint = 3.0  10 -10 m 2 s -1 . For simulations in Figure 5, intra-particle diffusivity was kept at Dint = 1.0  10 -10 m 2 s -1 while three partition coefficients were tested: kp = 0.08, kp = 0.12 and kp = 0.16.  Those preliminary LBM simulations in Figure 4 and Figure 5 should be compared with counterparts in Figure 2(a) and Figure 3(a), respectively. One notes that relaxing both kp and Dint from their original (i.e. 'convection-biased') values tends to improve the related numerical results. As far as fluid-phase diffusivity is concerned, Figure 3 suggests that Df seems to dictate (i.e. are linked to) asymptotic values of mass-basis extraction yields.
Virtualization of continuous-flow biocompounds extraction should then employ input parameters fine-tuned against relatively more comprehensive models invoking diffusion in addition to convection, as the former mass transport mechanism can be influential in large equipment (REIS-VASCO et al., 2000;GASPAR et al., 2003;ROSA et al., 2016 , 2017). While governing differential equations remain parabolic in pure-convection models, they become elliptic if species diffusion is further considered.
By entailing kp and Dint together with Df and/or other process parameters (e.g. cmax), such a task can be rationalized with the help of dimensionless models (RABI et al., 2020).
Nevertheless, a systematic study on best-fitting extraction model parameters is beyond the scope of the present work.

CONCLUSION
Physics-based models of biocompounds extraction tend to be complex enough so that numerical methods become necessary, which invoke input parameters taken from the literature. By relying on an extant convention-diffusion model for continuous-flow extraction of essential oil from gorse, this work examined potential effects on numerical simulations performed with input parameters fine-tuned against a pure-convection model. Also, either Dirichlet or Danckwerts condition was imposed to fluid-phase concentration at bed inlet.
While the expected trend of extraction yield curves was reasonably simulated, input parameters fine-tuned against pure-convection model resulted unsuitable for simulations based on convection-diffusion model. Numerical results also suggested that Danckwerts boundary condition should be preferred at bed inlet as Dirichlet condition underestimated species (i.e. oil) concentrations simulated in the fluid phase.
Systematic fine-tuning of input parameters proved to be still required, particularly in view of relatively comprehensive extraction models, e.g. additionally considering mass (i.e. species) diffusion in conjunction with convection. By invoking an allegedly Einstein's quote, "everything should be made as simple as possible, but no simpler".