Design Space Identification and Visualization for Continuous Pharmaceutical Manufacturing

Progress in continuous flow chemistry over the past two decades has facilitated significant developments in the flow synthesis of a wide variety of Active Pharmaceutical Ingredients (APIs), the foundation of Continuous Pharmaceutical Manufacturing (CPM), which has gained interest for its potential to reduce material usage, energy and costs and the ability to access novel processing windows that would be otherwise hazardous if operated via traditional batch techniques. Design space investigation of manufacturing processes is a useful task in elucidating attainable regions of process performance and product quality attributes that can allow insight into process design and optimization prior to costly experimental campaigns and pilot plant studies. This study discusses recent demonstrations from the literature on design space investigation and visualization for continuous API production and highlights attainable regions of recoveries, material efficiencies, flowsheet complexity and cost components for upstream (reaction + separation) via modeling, simulation and nonlinear optimization, providing insight into optimal CPM operation.


Introduction
Increasing pharmaceutical Research and Development (R&D) expenditures necessitate the need for leaner manufacturing with reduced costs. There has been significant research focus on continuous Active Pharmaceutical Ingredient (API) production due to pressure on the pharmaceutical industry to reduce drug development times, minimize product quality variation and process deviations, decrease overall costs and minimize environmental impact with lower capital and operating expenditures that are inherent of the smaller equipment and material usage reductions with continuous operations [1,2]. The chemistry, chemical engineering and process systems engineering communities have approached both unit operation and plantwide Continuous Pharmaceutical Manufacturing (CPM) from both experimental (laboratory and pilot plants) and theoretical (mathematical modeling, simulation and optimization) perspectives to elucidate promising designs for continuous API production [3,4].
Design space investigation for different process options is a useful task in elucidating critical process parameters as well as understanding the attainable region of product quality attributes and technoeconomic performances. Our group has conducted many studies in technoeconomic modeling, simulation and optimization of CPM for a variety of APIs, including both upstream plants (flow synthesis + purification/separation) and isolated separation trains (e.g., crystallization cascades). An understanding of the attainable performances within design spaces for different APIs that have been realized as amenable to CPM (from studies in the literature) can be useful in elucidating technoeconomic viability vs. existing processes. Therein lies the novelty of this study.

Liquid-Liquid Extraction
The aim of LLE is to purify a multicomponent mixture by addition of a solvent which induces the splitting of the mixture into multiple phases, between which solutes partition; the objective is to partition undesired solute component (e.g., impurities) into one phase while the desired solute (e.g., product API) preferentially partitions into the other. Purification via LLE is typically implemented in pharmaceutical processes prior to crystallization to ensure as few undesirable impurities as possible are incorporated into crystalline products. The design of continuous LLE processes is an important aspect of end-to-end CPM plant development.
The majority of LLE process demonstrations are still done in batch, even with a continuous flow synthesis demonstration. That said, there have been a few experimental as well as theoretical studies on the design of continuous LLE processes. Drageset and Bjørsvik (2016) performed an in-line continuous LLE for purification of a reactor product mixture prior to further downstream processing, allowing for significant material reduction compared to the batch purification process [19]. Monbaliu et al. (2016) also implemented a continuous LLE process as part of an end-to-end CPM process for lidocaine hydrochloride (a local anesthetic) from synthesis to aqueous formulation [20]. Implementation of combined experimental and modeling approaches towards integrated LLE design described in the literature for pharmaceutical purifications and separations demonstrate the utility of theoretical methods in establishing optimal design and operating parameters [19][20][21].

Crystallization
A significant portion of pharmaceutical products are sold as solids (tablets, dispersions, gels or topical treatments), and thus crystallization is an essential unit operation in Drug Product (DP) manufacturing. The aim of crystallization is to form a solid product of the desired compound with minimal impurity + solvent incorporation into the crystal structure while also attaining the desired polymorph, suitable mean crystal size and size distribution properties, all of which affect subsequent downstream process unit operations and the bioavailability of the drug in the patient.
Continuous crystallization has received attention for its potential to increase flexibility, efficiency and quality [22]. Continuous crystallization operates under steady-state conditions, allowing higher reproducibility and better control of important crystal properties such as the purity and the size distribution; however, as continuous processes do not discharge at equilibrium, they tend to achieve lower yields than batch crystallizations [23]. Continuous crystallizer designs applicable for the pharmaceutical industry are categorized as Plug Flow Crystallizers (PFCs), Continuous Oscillatory Baffled Crystallizers (COBCs) or Mixed Suspension-Mixed Product Removal (MSMPR) crystallizers. PFCs are suited to systems with fast crystal growth and short residence times and can attain narrow crystal size distributions [24], but fouling and clogging in narrow tube diameters is an important technical issue [25]. COBCs are another emerging technology, which enhance heat and mass transfer, but have issues handling streams with high solid loadings [26]. Various experimental and modeling studies have been conducted for the estimation of crystallization kinetics, proof-of-concept demonstrations and design and optimization processes [27][28][29][30][31][32].

Continuous Downstream Processing + Drug Product Formulation
Pharmaceutical manufacturing can be classified into distinct stages in series: synthesis, the singleor multistep reaction to form the target API molecule from reagents; purification and separation, the removal of API/impurities from the reaction mixture to sufficient purity that is often followed by crystallization due to most drugs being administered as solids; and formulation, where the Drug Product (DP) is made, making the API into a form that is consumable and effective.
Downstream processing for DP formulation is an essential set of stages in a pharmaceutical plant in order to yield the final product in the form by which it will be administered. As such, stringent product quality assurance in these stages is paramount. Continuous manufacturing in these stages is Various unit operations exist for the formulation of different types of DPs, depending on the form in which it is to be administered to the patient. Different studies consider varying flowsheet complexities and combinations of unit operations, a few pertinent literature examples of which are briefly described here. Su et al. (2019) implemented model predictive control to attain specific product quality attributes that were met for a rotary tablet press (composed of filling, metering, compression and tablet ejection) as part of a downstream pilot plant [33]. Martinetz et al. (2017) also considered a similar continuous rotary tablet press, which was designed to be robust with respect to varying feed flow rates for different product formulations [34]. Metta et al. (2019) performed design and dynamic simulation of a continuous tableting line (composed of feeders, blenders, wet granulation, fluidized bed drying, milling + tablet press). The authors elucidated the critical process parameters affecting product quality that needed to be ensured in order to facilitate robust process design [35].  formulated a dynamic model for continuous roller compaction using a model based approach which was subsequently used for control due to the process being very sensitive to inlet bulk density [36,37]. Bano et al. (2019) also considered the continuous roller compaction of microcrystalline cellulose, combining first-principles methods with plant data to establish the alteration of the design space subject to process disturbances and uncertainty [38]. Tian et al. (2019) considered a continuous direct compression line (feeders, blenders + press) which was modelled and simulated following a sensitivity analysis for the elucidation of critical process parameters [39].

Industrial Adoption of Continuous Pharmaceutical Manufacturing
While manufacturing sectors such as the oil and gas industry traditionally operate in continuous mode, pharmaceutical production is traditionally batchwise, only implementing continuous mode for select cases in the past decade. Continuous manufacturing was highlighted as a key green chemistry principle by various industrial and regulatory bodies [1,40], with various efforts towards generalizing methodologies towards facilitation of the transition of batch to continuous processes [2,3]. That said, the selection of which processes can be conducted continuously is still predominantly done on a case-by-case basis. Here, we list some examples of adoption of continuous manufacturing for different pharmaceutical processes at different scales.
The first fully end-to-end CPM plant was demonstrated by Mascia et al. (2013), where aliskiren hemifumarate was synthesized, purified, crystallized and subsequently formulated into the desired DP whilst mitigating solids handling issues and removing the need for intermediate solvent swaps between unit operations [41]. Adamo et al. (2016) also demonstrated a compact, end-to-end production of multiple DPs with different APIs [13]. Monbaliu et al. (2016) developed an automated system for the end-to-end CPM of lidocaine hydrochloride [20]; Cole et al. (2019) described the end-to-end CPM of merestinib (a new biliary tract cancer drug) from synthesis to crystallization [14,15]. The above-mentioned demonstrations were implemented on pilot or production plant level.
The implementation of CPM at production level has begun to appear more prevalently in recent years for plant subsystem and plantwide designs [42][43][44]. Vertex committed to continuous Orkambi (containing lumacaftor and ivacaftor for cystic fibrosis treatment) tableting [45]. GSK began continuous production of amoxicillin at a fully continuous plant in Singapore [46] and also began a continuous line for daprodusat (a new anemia mediation) [47,48]. In 2016, Janssen received FDA approval for the continuous tablet production for Prezista, whose API, darunavir, is used as part of HIV/AIDS combinative treatments [49]. Eli Lilly recently committed a significant capital investment to a continuous production plant in Ireland [50].
The relatively few examples of industrial adoption of CPM highlights a need for understanding the attainable process performances of candidate designs to ensure CPM success; this is where design space investigation via modeling, simulation and optimization can be useful tools.

Design Space Investigation
The literature contains many examples of design space investigation studies for both batch and CPM processes on the unit operation, subsystem or plant level. Here, we describe some pertinent examples of such studies in flow synthesis, separation and downstream processing.

Continuous Flow Synthesis
The demonstration of continuous flow chemistry of an API (i.e., in which the synthesis is performed in flow as opposed to in batch) is the foundation of any CPM process; however, subsequent purification + separation (upstream) and DP formulation (downstream) unit operations are often challenging and expensive processes that must be considered in the comparative evaluation of different designs. Establishing feasible operating regions to meet desired product quality and process performance targets is an important part of design in various CPM studies.
Process chemists often spend extensive periods of time attempting to find optimal reaction conditions (temperature, residence time, reagent and/or base concentration, catalyst loading etc.) in order to maximize product yields, selectivities and purities. Whilst a mechanistic understanding of chemical reactions is useful (via development of deterministic models that can be reparameterized for use in other similar reaction systems), their development can be time-consuming and a data-driven approach may be more convenient for the specific application. However, retrieving sufficient data to have a meaningful data-driven model can be laborious and time-consuming in itself. For this reason, the development of automated continuous flow systems for reaction is a hot topic of research. Bédard et al. (2018) developed a continuous synthesis system composed of reagent/feedstocks and pumps and interchangeable reactor and separator modules with online analytics and a software interface for process control and reaction monitoring ( Figure 1). The authors demonstrated a variety of pharmaceutical reactions in flow, elucidating optimal regions of operation regarding operating temperature, residence time, reagent ratios, catalyst and base loading [51]. The modularity and automated nature of the system allowed for optimal reaction conditions being elucidated for C-C and C-N cross-couplings, olefinations, reductive aminations nucleophilic aromatic substitution, photoredox catalysis and multistep sequences thereof, all of which are highly relevant to the flow chemistry community, particularly for the continuous synthesis of APIs. The demonstration of continuous flow chemistry of an API (i.e., in which the synthesis is performed in flow as opposed to in batch) is the foundation of any CPM process; however, subsequent purification + separation (upstream) and DP formulation (downstream) unit operations are often challenging and expensive processes that must be considered in the comparative evaluation of different designs. Establishing feasible operating regions to meet desired product quality and process performance targets is an important part of design in various CPM studies.
Process chemists often spend extensive periods of time attempting to find optimal reaction conditions (temperature, residence time, reagent and/or base concentration, catalyst loading etc.) in order to maximize product yields, selectivities and purities. Whilst a mechanistic understanding of chemical reactions is useful (via development of deterministic models that can be reparameterized for use in other similar reaction systems), their development can be time-consuming and a datadriven approach may be more convenient for the specific application. However, retrieving sufficient data to have a meaningful data-driven model can be laborious and time-consuming in itself. For this reason, the development of automated continuous flow systems for reaction is a hot topic of research. Bédard et al. (2018) developed a continuous synthesis system composed of reagent/feedstocks and pumps and interchangeable reactor and separator modules with online analytics and a software interface for process control and reaction monitoring ( Figure 1). The authors demonstrated a variety of pharmaceutical reactions in flow, elucidating optimal regions of operation regarding operating temperature, residence time, reagent ratios, catalyst and base loading [51]. The modularity and automated nature of the system allowed for optimal reaction conditions being elucidated for C-C and C-N cross-couplings, olefinations, reductive aminations nucleophilic aromatic substitution, photoredox catalysis and multistep sequences thereof, all of which are highly relevant to the flow chemistry community, particularly for the continuous synthesis of APIs.  Figure 2) [52]. The authors also compared the performance and accuracy obtained by design space investigation using a Computational Fluid Dynamics (CFD) approach vs. experiments, with the CFD results being comparably accurate but faster and without experimental labor.
Pharmaceutics 2020, 12, x FOR PEER REVIEW 6 of 24 treatment ( Figure 2) [52]. The authors also compared the performance and accuracy obtained by design space investigation using a Computational Fluid Dynamics (CFD) approach vs. experiments, with the CFD results being comparably accurate but faster and without experimental labor. Reizman and Jensen (2015) considered the effect of reaction carrier solvent for optimization of a synthesis performed in microliter slugs, comparing the process yield as a function of reagent molar ratios and residence time in each considered solvent [53]. The authors screened discrete (reactor materials, catalyst, base, carrier solvent) and continuous (reaction temperature, residence time) variables simultaneously; their automated system was used to maximize reaction yield. The study is in a similar vein to Bédard et al. (see Figure 1), but without the automated experimental setup, which is not a commercially available rig.  [54]. Their design space investigation vs. different batch configurations showed improvements with respect to product yield and purity, illustrating the benefit of design space investigation in order to maximize the benefits of CPM compared to existing batch processes ( Figure 3). Reizman and Jensen (2015) considered the effect of reaction carrier solvent for optimization of a synthesis performed in microliter slugs, comparing the process yield as a function of reagent molar ratios and residence time in each considered solvent [53]. The authors screened discrete (reactor materials, catalyst, base, carrier solvent) and continuous (reaction temperature, residence time) variables simultaneously; their automated system was used to maximize reaction yield. The study is in a similar vein to Bédard et al. (see Figure 1), but without the automated experimental setup, which is not a commercially available rig.  [54]. Their design space investigation vs. different batch configurations showed improvements with respect to product yield and purity, illustrating the benefit of design space investigation in order to maximize the benefits of CPM compared to existing batch processes ( Figure 3).
Pharmaceutics 2020, 12, x FOR PEER REVIEW 6 of 24 treatment ( Figure 2) [52]. The authors also compared the performance and accuracy obtained by design space investigation using a Computational Fluid Dynamics (CFD) approach vs. experiments, with the CFD results being comparably accurate but faster and without experimental labor. Reizman and Jensen (2015) considered the effect of reaction carrier solvent for optimization of a synthesis performed in microliter slugs, comparing the process yield as a function of reagent molar ratios and residence time in each considered solvent [53]. The authors screened discrete (reactor materials, catalyst, base, carrier solvent) and continuous (reaction temperature, residence time) variables simultaneously; their automated system was used to maximize reaction yield. The study is in a similar vein to Bédard et al. (see Figure 1), but without the automated experimental setup, which is not a commercially available rig. Boros et al. (2019) considered the flow synthesis of vortioxetine (an antidepressant API) from an intermediate, comparing the effects of temperature and residence time on process yield [54]. Their design space investigation vs. different batch configurations showed improvements with respect to product yield and purity, illustrating the benefit of design space investigation in order to maximize the benefits of CPM compared to existing batch processes ( Figure 3).  Wyvratt et al. (2019) characterized the design space of a Knoevenagel condensation (a nucleophilic addition of a carbanion to a carbonyl compound followed by dehydration, which is a key reaction stage in the production of many APIs). The authors elucidated the design space by varying residence time and catalyst loading whilst minimizing the number of experiments and material consumption required to adequately map the design space ( Figure 4). The number of experiments, and hence material requirements, needed for data-driven reaction modeling is one of the main drawbacks of the approach; hence, the study provides a valuable methodology for materially-efficient design space elucidation for flow synthesis [55].
Pharmaceutics 2020, 12, x FOR PEER REVIEW 7 of 24 Wyvratt et al. (2019) characterized the design space of a Knoevenagel condensation (a nucleophilic addition of a carbanion to a carbonyl compound followed by dehydration, which is a key reaction stage in the production of many APIs). The authors elucidated the design space by varying residence time and catalyst loading whilst minimizing the number of experiments and material consumption required to adequately map the design space ( Figure 4). The number of experiments, and hence material requirements, needed for data-driven reaction modeling is one of the main drawbacks of the approach; hence, the study provides a valuable methodology for materially-efficient design space elucidation for flow synthesis [55].  Figure 5) [56]. The authors found that each of the considered batch/continuous processes presented inherent trade-offs between different LCA criteria and process chemistry options. This study (amongst others) demonstrates typical trade-offs and complexity in process synthesis and design selection, which can be aided by detailed design space investigations.  Comparative evaluation of batch vs. continuous syntheses are also useful in quantifying technoeconomic benefits of different production paradigms and flowsheet configurations [55]. Life Cycle Assessment (LCA) has been performed for different flow chemistry and plant design studies in the literature for pharmaceuticals and the production of other chemicals. Ott et al. (2016) performed LCA for different flowsheet configurations of batch vs. flow microreactor networks for rufinamide synthesis, considering various metrics related to plant material efficiencies and environmental impacts (including potentials for global warming, human toxicity, natural land transformation, ozone depletion, photochemical oxidation and terrestrial acidification and ecotoxicity) of different production options ( Figure 5) [56]. The authors found that each of the considered batch/continuous processes presented inherent trade-offs between different LCA criteria and process chemistry options. This study (amongst others) demonstrates typical trade-offs and complexity in process synthesis and design selection, which can be aided by detailed design space investigations. Wyvratt et al. (2019) characterized the design space of a Knoevenagel condensation (a nucleophilic addition of a carbanion to a carbonyl compound followed by dehydration, which is a key reaction stage in the production of many APIs). The authors elucidated the design space by varying residence time and catalyst loading whilst minimizing the number of experiments and material consumption required to adequately map the design space ( Figure 4). The number of experiments, and hence material requirements, needed for data-driven reaction modeling is one of the main drawbacks of the approach; hence, the study provides a valuable methodology for materially-efficient design space elucidation for flow synthesis [55]. Comparative evaluation of batch vs. continuous syntheses are also useful in quantifying technoeconomic benefits of different production paradigms and flowsheet configurations [55]. Life Cycle Assessment (LCA) has been performed for different flow chemistry and plant design studies in the literature for pharmaceuticals and the production of other chemicals. Ott et al. (2016) performed LCA for different flowsheet configurations of batch vs. flow microreactor networks for rufinamide synthesis, considering various metrics related to plant material efficiencies and environmental impacts (including potentials for global warming, human toxicity, natural land transformation, ozone depletion, photochemical oxidation and terrestrial acidification and ecotoxicity) of different production options ( Figure 5) [56]. The authors found that each of the considered batch/continuous processes presented inherent trade-offs between different LCA criteria and process chemistry options. This study (amongst others) demonstrates typical trade-offs and complexity in process synthesis and design selection, which can be aided by detailed design space investigations.

Continuous Separation Process Design
In crystallization processes, critical product quality attributes (mean product size and size distribution width) that affect downstream processing and drug bioavailability are very sensitive to process design and operating parameters. Ridder et al. (2014) performed experiments and modelled the antisolvent crystallization of flufenamic acid in a multisegment, multiaddition plug-flow crystallizer, where the antisolvent feed rate to different tubular crystallizer segments was varied in order to either maximize the mean crystal size or minimize the product size distribution coefficient of variation ( Figure 6). The authors presented trade-offs between the two product quality attributes [57]. The study demonstrated the benefits of rigorous modeling and optimization for process design whilst circumventing expensive experiments to attain specific quality attributes.

Continuous Separation Process Design
In crystallization processes, critical product quality attributes (mean product size and size distribution width) that affect downstream processing and drug bioavailability are very sensitive to process design and operating parameters. Ridder et al. (2014) performed experiments and modelled the antisolvent crystallization of flufenamic acid in a multisegment, multiaddition plug-flow crystallizer, where the antisolvent feed rate to different tubular crystallizer segments was varied in order to either maximize the mean crystal size or minimize the product size distribution coefficient of variation ( Figure 6). The authors presented trade-offs between the two product quality attributes [57]. The study demonstrated the benefits of rigorous modeling and optimization for process design whilst circumventing expensive experiments to attain specific quality attributes. In the past decade, process integration and intensification have been recent topics of interest within the process chemistry and systems engineering communities for their ability to attain otherwise difficult windows of product quality whilst also minimizing equipment dimensions and material consumption. Wang and Lakerveld (2017) combined a membrane separation with a MSMPR crystallization cascade with mother liquor recycle to maximize particle size by varying crystallizer operating temperatures subject to impurity limits, temperature constraints, yield specification, set cascade residence time and solvent removal rate [18]. Their results showed that incorporating membrane separations into a traditional MSMPR cascade significantly widens the region of attainable In the past decade, process integration and intensification have been recent topics of interest within the process chemistry and systems engineering communities for their ability to attain otherwise difficult windows of product quality whilst also minimizing equipment dimensions and material consumption. Wang and Lakerveld (2017) combined a membrane separation with a MSMPR crystallization cascade with mother liquor recycle to maximize particle size by varying crystallizer operating temperatures subject to impurity limits, temperature constraints, yield specification, set cascade residence time and solvent removal rate [18]. Their results showed that incorporating membrane separations into a traditional MSMPR cascade significantly widens the region of attainable product particle sizes whilst shortening the total residence time (Figure 7). The regions of attainable product quality were shown to be significantly larger when implementing longer crystallization cascades with membranes vs. those without membranes.
Pharmaceutics 2020, 12, x FOR PEER REVIEW 9 of 24 product particle sizes whilst shortening the total residence time ( Figure 7). The regions of attainable product quality were shown to be significantly larger when implementing longer crystallization cascades with membranes vs. those without membranes. Köllges and Vetter (2019) designed a single MSMPR crystallizer coupled with milling to attain the stable β-polymorph of L-glutamic acid from aqueous solution, mapping the attainable process productivities vs. polymorphic regions (Figure 8) [58]. The authors showed that only via addition of a milling process to the crystallization process allowed for attainment of the β-polymorph, whereas the crystallizer alone could only produce the metastable α-polymorph. The design space study elucidated the fact that the fines generation from milling increased the available crystallization surface area, which enhanced the yield and widened the attainable region of product quality attributes vs. the crystallization process alone.  Köllges and Vetter (2019) designed a single MSMPR crystallizer coupled with milling to attain the stable β-polymorph of l-glutamic acid from aqueous solution, mapping the attainable process productivities vs. polymorphic regions (Figure 8) [58]. The authors showed that only via addition of a milling process to the crystallization process allowed for attainment of the β-polymorph, whereas the crystallizer alone could only produce the metastable α-polymorph. The design space study elucidated the fact that the fines generation from milling increased the available crystallization surface area, which enhanced the yield and widened the attainable region of product quality attributes vs. the crystallization process alone.
Pharmaceutics 2020, 12, x FOR PEER REVIEW 9 of 24 product particle sizes whilst shortening the total residence time ( Figure 7). The regions of attainable product quality were shown to be significantly larger when implementing longer crystallization cascades with membranes vs. those without membranes. Köllges and Vetter (2019) designed a single MSMPR crystallizer coupled with milling to attain the stable β-polymorph of L-glutamic acid from aqueous solution, mapping the attainable process productivities vs. polymorphic regions (Figure 8) [58]. The authors showed that only via addition of a milling process to the crystallization process allowed for attainment of the β-polymorph, whereas the crystallizer alone could only produce the metastable α-polymorph. The design space study elucidated the fact that the fines generation from milling increased the available crystallization surface area, which enhanced the yield and widened the attainable region of product quality attributes vs. the crystallization process alone.

Downstream Processing
Various efforts towards design space investigation and characterization of downstream pharmaceutical unit operations exist in the literature. Many of these studies make use of statistical techniques such as Partial Least Squares (PLS) and Principal Component Analysis (PCA) methods to understand the underlying causalities and correlations between various plant input and output variables and process parameters, especially when there are significant historical data available and insufficient time to develop, parameterize and validate more detailed mechanistic models [59]. Bano et al. (2018) elucidated the design spaces for three different pharmaceutical process case studies of different size (including a blending and tableting subprocess) and complexity using PLS and applying a Radial Basis Function (RBF) to define the process' feasible region (Figure 9) [60].  Wang et al. (2017) considered the design space of a milling + blending + tableting process with many dimensions (problem variables), including stream flowrates, target densities, unit residence times, holdups, product particle size distribution properties and final table properties such as weight, hardness and API concentration [61]. Performing a sensitivity analysis (via Morris Screening) on the effects of inputs vs. outputs aided the elucidation of the feasible region of operation ( Figure 10).

This Study
It has been illustrated in the above subsections discussing the literature and the state of continuous manufacturing in the pharmaceutical industry that design space investigation via modeling, simulation and optimization can be of great utility for CPM development. In this work, we focus on the upstream CPM of several APIs for which technoeconomic simulation and optimization studies have been performed in the literature for comparative evaluation of typical attainable process performances. Observation of trends common between different APIs, despite their widely varying processes and chemistries, provides a deeper understanding of the attainable process performances for APIs which are amenable to CPM and can be done so successfully.

Plantwide Design Space Investigation
In this study, we concentrate on upstream plantwide CPM studies we have previously done, encompassing both reaction (flow synthesis) and separation (continuous LLE or crystallization) phenomena and unit operations as well as detailed Capital (CapEx) and Operating (OpEx) Expenditure cost components.

Upstream Plantwide Design Case Studies
The following APIs are considered for analysis in this study: ibuprofen (the popular analgesic), artemisinin (a potent antimalarial), diphenhydramine (a branded antihistamine), warfarin (an anticoagulant), atropine (treatment of nerve agent effects) and nevirapine (used in HIV treatments).

Ibuprofen
The continuous flow synthesis of ibuprofen was demonstrated by Bogdan and coworkers (2009), consisting of three consecutive reactions in flow [62], followed by a conceptual continuous LLE process [63]-the CPM flowsheet for this process is shown in Figure 11

This Study
It has been illustrated in the above subsections discussing the literature and the state of continuous manufacturing in the pharmaceutical industry that design space investigation via modeling, simulation and optimization can be of great utility for CPM development. In this work, we focus on the upstream CPM of several APIs for which technoeconomic simulation and optimization studies have been performed in the literature for comparative evaluation of typical attainable process performances. Observation of trends common between different APIs, despite their widely varying processes and chemistries, provides a deeper understanding of the attainable process performances for APIs which are amenable to CPM and can be done so successfully.

Plantwide Design Space Investigation
In this study, we concentrate on upstream plantwide CPM studies we have previously done, encompassing both reaction (flow synthesis) and separation (continuous LLE or crystallization) phenomena and unit operations as well as detailed Capital (CapEx) and Operating (OpEx) Expenditure cost components.

Upstream Plantwide Design Case Studies
The following APIs are considered for analysis in this study: ibuprofen (the popular analgesic), artemisinin (a potent antimalarial), diphenhydramine (a branded antihistamine), warfarin (an anticoagulant), atropine (treatment of nerve agent effects) and nevirapine (used in HIV treatments).

Warfarin
The continuous synthesis of (S)-warfarin was demonstrated by Porta et al. (2015), featuring the nucleophilic addition of 4-hydroxy-coumarin to benzalacetone in the presence of TFA and a chiral amine catalyst in 1,4-dioxane [67]. Upon addition of the candidate LLE solvent, the process forms an organic (product) phase containing recovered API and an aqueous (waste) phase. Several candidate separation solvents are compared for continuous LLE: ethyl acetate (EtOAc), isopropyl acetate (iPrOAc) and isobutyl acetate (iBuOAc). The CPM flowsheet for warfarin is shown in Figure 14 [68].

Warfarin
The continuous synthesis of (S)-warfarin was demonstrated by Porta et al. (2015), featuring the nucleophilic addition of 4-hydroxy-coumarin to benzalacetone in the presence of TFA and a chiral amine catalyst in 1,4-dioxane [67]. Upon addition of the candidate LLE solvent, the process forms an organic (product) phase containing recovered API and an aqueous (waste) phase. Several candidate separation solvents are compared for continuous LLE: ethyl acetate (EtOAc), isopropyl acetate (iPrOAc) and isobutyl acetate (iBuOAc). The CPM flowsheet for warfarin is shown in Figure 14 [68].

Atropine
The continuous flow synthesis of atropine was demonstrated by Bédard et al. (2016), featuring two flow reactions: the esterification of tropine (in dimethylformamide, DMF) and neat phenylacetyl chloride at 100 °C (in R-501) to form tropine ester HCl, the free form of which is formed by the addition of sodium hydroxide (NaOH (aq.)). In R-502, the aldol addition of formaldehyde (CH2O) to the tropine ester at 100 °C under basic conditions forms the API, accompanied by an undesired elimination of API to apoatropine via condensation [69]. A subsequent continuous LLE in a cascade of vessels is performed with either diethyl ether (Et2O), n-butyl acetate (BuOAc) or toluene (PhMe) for comparative evaluation purposes [70]. The CPM flowsheet for atropine is shown in Figure 15.

Atropine
The continuous flow synthesis of atropine was demonstrated by Bédard et al. (2016), featuring two flow reactions: the esterification of tropine (in dimethylformamide, DMF) and neat phenylacetyl chloride at 100 • C (in R-501) to form tropine ester HCl, the free form of which is formed by the addition of sodium hydroxide (NaOH (aq.)). In R-502, the aldol addition of formaldehyde (CH 2 O) to the tropine ester at 100 • C under basic conditions forms the API, accompanied by an undesired elimination of API to apoatropine via condensation [69]. A subsequent continuous LLE in a cascade of vessels is performed with either diethyl ether (Et 2 O), n-butyl acetate (BuOAc) or toluene (PhMe) for comparative evaluation purposes [70]. The CPM flowsheet for atropine is shown in Figure 15.

Warfarin
The continuous synthesis of (S)-warfarin was demonstrated by Porta et al. (2015), featuring the nucleophilic addition of 4-hydroxy-coumarin to benzalacetone in the presence of TFA and a chiral amine catalyst in 1,4-dioxane [67]. Upon addition of the candidate LLE solvent, the process forms an organic (product) phase containing recovered API and an aqueous (waste) phase. Several candidate separation solvents are compared for continuous LLE: ethyl acetate (EtOAc), isopropyl acetate (iPrOAc) and isobutyl acetate (iBuOAc). The CPM flowsheet for warfarin is shown in Figure 14 [68].

Atropine
The continuous flow synthesis of atropine was demonstrated by Bédard et al. (2016), featuring two flow reactions: the esterification of tropine (in dimethylformamide, DMF) and neat phenylacetyl chloride at 100 °C (in R-501) to form tropine ester HCl, the free form of which is formed by the addition of sodium hydroxide (NaOH (aq.)). In R-502, the aldol addition of formaldehyde (CH2O) to the tropine ester at 100 °C under basic conditions forms the API, accompanied by an undesired elimination of API to apoatropine via condensation [69]. A subsequent continuous LLE in a cascade of vessels is performed with either diethyl ether (Et2O), n-butyl acetate (BuOAc) or toluene (PhMe) for comparative evaluation purposes [70]. The CPM flowsheet for atropine is shown in Figure 15.    -603), CYCLOR flows over a packed bed of NaH to form nevirapine [71]. A subsequent purification and crystallization via pH change is performed to obtain purified API crystals. Different assumptions of solvent recovery, SR = {0%, 40%, 80%} (reflecting worst case, intermediate and laboratory-scale demonstrated recovery demonstrations, respectively), are considered. The CPM flowsheet for nevirapine is shown in Figure 16 [72].
Pharmaceutics 2020, 12, x FOR PEER REVIEW 14 of 24 3.1.6. Nevirapine The continuous flow synthesis of nevirapine was demonstrated by Verghese et al. (2017). First, 2-chloro-3-amino-4-picoline (CAPIC) and sodium hydride (NaH) form CAPIC-Na salt in diglyme at 95 °C in R-601; the effluent enters R-602 with neat 2-(cyclopropylamino)nicotinate (MeCAN) at 65 °C to form N-(2-chloro-4-methylpyridin-3-yl)-2-(cyclopropylamino)nicotinamide (CYCLOR). In the final reactor (R-603), CYCLOR flows over a packed bed of NaH to form nevirapine [71]. A subsequent purification and crystallization via pH change is performed to obtain purified API crystals. Different assumptions of solvent recovery, SR = {0%, 40%, 80%} (reflecting worst case, intermediate and laboratory-scale demonstrated recovery demonstrations, respectively), are considered. The CPM flowsheet for nevirapine is shown in Figure 16 [72]. The extent of modeling, simulation and optimization for the different API case studies considered vary: ibuprofen, artemisinin and diphenhydramine implement process simulation for design space investigation; warfarin and nevirapine studies implement Nonlinear Programming (NLP) for plantwide optimization for total cost minimization; atropine CPM implements Mixed Integer Nonlinear Programming (MINLP) for process synthesis to optimality, i.e., plant total cost minimization. Details of steady-state modeling, simulation and optimization implemented for each case study can be found in our previous research contributions listed above. Table 1 summarizes design option details for the different processes.  The extent of modeling, simulation and optimization for the different API case studies considered vary: ibuprofen, artemisinin and diphenhydramine implement process simulation for design space investigation; warfarin and nevirapine studies implement Nonlinear Programming (NLP) for plantwide optimization for total cost minimization; atropine CPM implements Mixed Integer Nonlinear Programming (MINLP) for process synthesis to optimality, i.e., plant total cost minimization. Details of steady-state modeling, simulation and optimization implemented for each case study can be found in our previous research contributions listed above. Table 1 summarizes design option details for the different processes.

Plant Design Performance Metrics
Process performance metrics encompassing technical performance, process intensity and costs are compared for different APIs and selected separation option. The process metrics considered for the comparative evaluation presented here are: Plantwide API recovery; Mass Productivity, MP = Mass of Product / Total Mass in Process (a measure of how efficiently material is used in a process [73]); Number of reaction and separation stages-a measure of process intensity; Capital (CapEx) and Operating (OpEx) Expenditures per unit mass of API produced.
The process metrics for each API case and design option are listed in Table 2 and illustrated for comparative evaluation via a radar plot in Figure 17. Each axis (process performance metric) in Figure 17 bears a different meaning depending on whether it has a high or low value. Clearly, high plantwide recoveries and MP but lower cost components are desirable. For the number of reaction and separation stages, reverse-ordered axes are used to illustrate that lower values are preferable (i.e., fewer unit operations equate to lower process complexity). The greater total surface area that a design option covers in Figure 17, the better the process design is; it is also important that a design is sufficiently high in all categories, not just highly performing in a few. For each API, the number of reactions and separation stages have the same coordinates for each different separation option.  [72] For ibuprofen, the different separation options (LLE solvent = {PhMe, nHex}) give similar results and thus the LLE solvent with the lower environmental/EHS impact (PhMe) is preferred [74]. For warfarin, each LLE solvent performs comparably, but has similar EHS characteristics; solvent selection should thus be informed by subsequent crystallization process design and the possibility for solvent harmonization, recovery and recycling.
For artemisinin, plantwide performance varies more significantly with antisolvent choice. The greater difference can be attributed to the different thermodynamic behaviors of the two antisolvents with the inlet mixture (toluene) due to the different polarities and functional groups on each antisolvent. For artemisinin, EtOH as antisolvent allows for lower costs and is more environmentally friendly than EtOAc; thus EtOH is the better antisolvent choice. For warfarin, the performances between different LLE solvent choices is comparable due to the similar thermodynamic behaviors of the ternary systems. For atropine, the LLE solvent choices perform comparably despite their different molecular structures, but Et2O and PhMe are less favorable than BuOAc with respect to their EHS characteristics; as for warfarin, consultation with processing requirements downstream and for plantwide operation + material efficiency is required. For nevirapine CPM, various values of Solvent Recovery (SR) are considered; whilst high SR (=80%) is attainable in laboratory-scale conditions, lower values are likely to be possible at larger scale operation. The assumed SR drastically affects OpEx, which is a significant contribution towards total costs, i.e., OpEx >> CapEx.
Pharmaceutical manufacturing is typically quite intensive in terms of material and energy consumption due to the multistep synthetic routes required to synthesize APIs as well as strict quality requirements which must be met prior to human consumption. Molecular Complexity Indices (CIs) Similarly for diphenhydramine, the different separation performances between the different LLE solvent choices is due to the different thermodynamic behavior of the ternary system and hence phase splitting and API partitioning between the resulting organic (product) and aqueous (waste) phases; this is also due to the differences between the molecular structure of the LLE solvent choices. For diphenhydramine, nHep has both poorer EHS characteristics than either CyHex or MeCyHex as well as incurring higher costs; thus, either of the cycloalkane solvent choices is preferable.
For warfarin, the performances between different LLE solvent choices is comparable due to the similar thermodynamic behaviors of the ternary systems. For atropine, the LLE solvent choices perform comparably despite their different molecular structures, but Et 2 O and PhMe are less favorable than BuOAc with respect to their EHS characteristics; as for warfarin, consultation with processing requirements downstream and for plantwide operation + material efficiency is required. For nevirapine CPM, various values of Solvent Recovery (SR) are considered; whilst high SR (=80%) is attainable in laboratory-scale conditions, lower values are likely to be possible at larger scale operation. The assumed SR drastically affects OpEx, which is a significant contribution towards total costs, i.e., OpEx >> CapEx.
Pharmaceutical manufacturing is typically quite intensive in terms of material and energy consumption due to the multistep synthetic routes required to synthesize APIs as well as strict quality requirements which must be met prior to human consumption. Molecular Complexity Indices (CIs) are often used to quantify the complexity/difficulty to synthesize a molecule with respect to its structure. The most popular metric is the Bertz CI, which varies with the different numbers and types of functional groups and their interconnections [75,76].
Our previous work has established correlations between complexity and economic parameters for a large set of top selling antibiotics [77,78]. Here, we examine the different performance metrics considered in Section 3.2 vs. their respective Molecular Weights (MWs) and CIs. Figure 18 shows plantwide recovery, E-factor and total costs vs. MW and CI for different API cases. For the dataset considered here, there is no obvious correlation between the performance metrics and MW/CI. Despite this, there are some observations to be made. The lowest plantwide recovery (by API) is artemisinin, which also has the highest costs. Designs for the considered APIs in this study have typical plantwide recoveries = 70-90% (with some outliers) and varying E-factors (E = 20-80), which are all either good or reasonable for pharmaceutical manufacturing [79][80][81]. This highlights that beyond this API recovery that cost benefits are incremental at best. Nevirapine has significantly higher E-factors than other APIs due to the purification implemented prior to crystallization via pH change, as described in the original literature studies [71,72]. are often used to quantify the complexity/difficulty to synthesize a molecule with respect to its structure. The most popular metric is the Bertz CI, which varies with the different numbers and types of functional groups and their interconnections [75,76].
Our previous work has established correlations between complexity and economic parameters for a large set of top selling antibiotics [77,78]. Here, we examine the different performance metrics considered in Section 3.2 vs. their respective Molecular Weights (MWs) and CIs. Figure 18 shows plantwide recovery, E-factor and total costs vs. MW and CI for different API cases. For the dataset considered here, there is no obvious correlation between the performance metrics and MW/CI. Despite this, there are some observations to be made. The lowest plantwide recovery (by API) is artemisinin, which also has the highest costs. Designs for the considered APIs in this study have typical plantwide recoveries = 70-90% (with some outliers) and varying E-factors (E = 20-80), which are all either good or reasonable for pharmaceutical manufacturing [79][80][81]. This highlights that beyond this API recovery that cost benefits are incremental at best. Nevirapine has significantly higher E-factors than other APIs due to the purification implemented prior to crystallization via pH change, as described in the original literature studies [71,72]. These results illustrate that some of these CPM processes are leaner/further developed than others, i.e., there are still process improvements to be made with respect to cost reductions and plant efficiencies. It should be noted that different methodologies have been applied for different API cases (see Table 1) when comparing the design solutions presented here for different APIs and separation options; nevertheless, the results presented in this study illustrate different attainable regions of plantwide performance typical of CPM for the considered APIs, which have been highlighted as amenable to CPM success in both their flow synthesis and modeling demonstrations. Figure 19 compares the attained E-factors (a measure of material efficiency) vs. plantwide recoveries. For ibuprofen, the attained recoveries, and thus E-factors, are similar for both LLE solvent choices (nHex, PhMe). For artemisinin, diphenhydramine and warfarin, the E-factor decreases (i.e., These results illustrate that some of these CPM processes are leaner/further developed than others, i.e., there are still process improvements to be made with respect to cost reductions and plant efficiencies. It should be noted that different methodologies have been applied for different API cases (see Table 1) when comparing the design solutions presented here for different APIs and separation options; nevertheless, the results presented in this study illustrate different attainable regions of plantwide performance typical of CPM for the considered APIs, which have been highlighted as amenable to CPM success in both their flow synthesis and modeling demonstrations. Figure 19 compares the attained E-factors (a measure of material efficiency) vs. plantwide recoveries. For ibuprofen, the attained recoveries, and thus E-factors, are similar for both LLE solvent choices (nHex, PhMe). For artemisinin, diphenhydramine and warfarin, the E-factor decreases (i.e., material efficiency improves) as plantwide recovery increases-this is expected, as waste quantities are lower when the plant API recovery is high for a specified plant API capacity. For atropine, the same trend is not observed; this is due to different quantities of separation solvent being used between design cases in order to attain total cost minima in the design cases [70]. For nevirapine, the different design cases correspond to different solvent recovery assumptions; evidently, as SR increases, the E-factor improves (i.e., decreases).
Pharmaceutics 2020, 12, x FOR PEER REVIEW 18 of 24 are lower when the plant API recovery is high for a specified plant API capacity. For atropine, the same trend is not observed; this is due to different quantities of separation solvent being used between design cases in order to attain total cost minima in the design cases [70]. For nevirapine, the different design cases correspond to different solvent recovery assumptions; evidently, as SR increases, the E-factor improves (i.e., decreases). Figure 19. Plantwide E-factors vs. attained API recoveries for different design cases. Figure 17 shows overall API cost contributions comparatively. Figure 20 shows the cost component contributions on a more detailed level to gain deeper insight into API cost contributions and how these are related to the design options selected from our previous studies. CapEx contributions are the Battery Limits Installed Cost (BLIC) and Working Capital and Contingency (WCC); OpEx contributions are materials and Utilities + Waste (U&W) [63].

API Cost Component Contributions
For ibuprofen, total cost components are dominated by CapEx, which is in turn predominantly BLIC components for both LLE solvents. Similar results are also observed for artemisinin, which implements antisolvent crystallization. For artemisinin, OpEx contributions are so low due to the main feedstock, DHAA, being a waste product from an existing process and considered to have negligible costs in its acquirement in comparison to the other material prices [63,64].
For diphenhydramine, OpEx contributions are more significant than for ibuprofen and artemisinin. Greater LLE solvent usage was used for the diphenhydramine design cases (in terms of the mass ratio of separation solvent-to-incoming feed stream) than for ibuprofen and artemisinin. The OpEx contributions for MeCyHex are lower than for CyHex due to its lower material price and similar recovery (and thus flowrates and equipment sizes) [66]. The CapEx contributions for this API are less impactful due to less equipment being used, i.e., only one synthesis and one separation stage for diphenhydramine [65]. Process intensification and simplification is an excellent way to reduce costs and streamline production. Similar trends are observed for both warfarin and atropine, with components being similar across different separation options due to their similar performances (i.e., recoveries).
For nevirapine, total OpEx components reduce with increasing Solvent Recovery (SR) assumption due to less fresh solvents being required. The values of SR considered are 0% (worst case scenario = no recovery), 40% (intermediate) and 80% (best case scenario = recovery attained in the laboratory-scale demonstration [71]); other values can easily be compared to these results using the published plantwide model and optimization framework [72].
Total cost components (i.e., CapEx and OpEx) have been scaled per unit mass of API produced in the product streams of each upstream CPM plant for fair comparison where different plant capacities are considered in different studies. Each case study considered upstream plant total costs as the economic metric for comparative evaluation of different process designs. Comparison of

E-Factor (-)
Plantwide Recovery (%) Figure 19. Plantwide E-factors vs. attained API recoveries for different design cases. Figure 17 shows overall API cost contributions comparatively. Figure 20 shows the cost component contributions on a more detailed level to gain deeper insight into API cost contributions and how these are related to the design options selected from our previous studies. CapEx contributions are the Battery Limits Installed Cost (BLIC) and Working Capital and Contingency (WCC); OpEx contributions are materials and Utilities + Waste (U&W) [63].

API Cost Component Contributions
For ibuprofen, total cost components are dominated by CapEx, which is in turn predominantly BLIC components for both LLE solvents. Similar results are also observed for artemisinin, which implements antisolvent crystallization. For artemisinin, OpEx contributions are so low due to the main feedstock, DHAA, being a waste product from an existing process and considered to have negligible costs in its acquirement in comparison to the other material prices [63,64].
For diphenhydramine, OpEx contributions are more significant than for ibuprofen and artemisinin. Greater LLE solvent usage was used for the diphenhydramine design cases (in terms of the mass ratio of separation solvent-to-incoming feed stream) than for ibuprofen and artemisinin. The OpEx contributions for MeCyHex are lower than for CyHex due to its lower material price and similar recovery (and thus flowrates and equipment sizes) [66]. The CapEx contributions for this API are less impactful due to less equipment being used, i.e., only one synthesis and one separation stage for diphenhydramine [65]. Process intensification and simplification is an excellent way to reduce costs and streamline production. Similar trends are observed for both warfarin and atropine, with components being similar across different separation options due to their similar performances (i.e., recoveries).
for different APIs, but are subject to API sales price variation, which may be quite significant for certain drugs (e.g., artemisinin). Ultimately, when choosing whether to switch to continuous operation, clear operational and economic benefits must be clear over traditional/current manufacturing methods for the API.   Figure 20. Total cost contributions towards API production.
For nevirapine, total OpEx components reduce with increasing Solvent Recovery (SR) assumption due to less fresh solvents being required. The values of SR considered are 0% (worst case scenario = no recovery), 40% (intermediate) and 80% (best case scenario = recovery attained in the laboratory-scale demonstration [71]); other values can easily be compared to these results using the published plantwide model and optimization framework [72].
Total cost components (i.e., CapEx and OpEx) have been scaled per unit mass of API produced in the product streams of each upstream CPM plant for fair comparison where different plant capacities are considered in different studies. Each case study considered upstream plant total costs as the economic metric for comparative evaluation of different process designs. Comparison of optimal Net Present Values (NPVs) can also provide valuable insight and alternative process designs for different APIs, but are subject to API sales price variation, which may be quite significant for certain drugs (e.g., artemisinin). Ultimately, when choosing whether to switch to continuous operation, clear operational and economic benefits must be clear over traditional/current manufacturing methods for the API.

Conclusions
Design space investigation of CPM is a useful task in elucidating the attainable regions of operation and process efficiency and attainable product quality. The literature contains many demonstrations that have elucidated operating regions and mapped design spaces on a technical basis at unit operation level for API synthesis, purification and downstream formulation, but not integrated stages thereof. In this study, we compare technoeconomic plantwide analyses for upstream CPM (reaction + separation) for various APIs considered by our group, all of which have high economic impact and societal importance. The design space investigation for each API considers reaction + purification/separation, with the main tuning parameters between design cases pertaining to the separation processes, which have receive little attention in comparison to the number of literature studies on synthesis optimization. Comparative evaluation of different design cases is on the basis of technical, operational, economic and EHS criteria. Currently, decisions on whether to operate continuously is made on a case-by-case/API basis. Elucidating operating regions for demonstrated CPM for different APIs is an important step towards more systematic selection and screening of promising candidates for continuous production.