API¶
Particle Models¶
FluidizedBedND¶
- class aldsim.core.particle.fluidizedbed.FluidizedBedND(Da=None)[source]¶
Bases:
objectModel for batch fluidized bed reactor under plug flow approximations.
Implementation of a non-dimensional model for particle coating by atomic layer deposition. It assumes a well mixed approximation for particle mixing and plug flow approximation for precursor transport.
The model assumes a first-order irreversible Langmuir kinetics with the sticking probability value contained in the Damkohler number.
The normalized time in the model refers to the normalized dose time during the precursor exposure step.
Parameters¶
- Dafloat
Damkohler number, a dimensionless parameter representing the ratio of reaction rate to transport rate. Higher values indicate faster surface reactions relative to mass transport. Must be non-negative.
Attributes¶
- Dafloat
The Damkohler number for the system.
Examples¶
Create a FluidizedBedND model with a Damkohler number of 2.0:
>>> model = FluidizedBedND(Da=2.0) >>> coverage = model.calc_coverage(t=1.0) >>> print(f"Coverage: {coverage:.3f}") Coverage: 0.797
Calculate saturation curve over normalized dose time:
>>> t, coverage = model.saturation_curve(tmax=3.0, dt=0.1) >>> max_coverage = coverage[-1] >>> print(f"Maximum coverage: {max_coverage:.3f}") Maximum coverage: 0.950
Notes¶
The Damkohler number (Da) is defined as:
Da = k * τ
where k is the first-order reaction rate constant and τ is the characteristic time scale for precursor dosing.
- calc_coverage(t=1, Da=None)[source]¶
Calculate the surface coverage at a given normalized dose time
Computes the fractional surface coverage θ of particles by precursor molecules in the batch fluidized bed reactor at a specified normalized dose time. The calculation uses analytical solutions for the well-mixed particle model with plug flow precursor transport and first-order Langmuir kinetics.
Parameters¶
- tfloat, optional
Normalized dose time (dimensionless), defined as the ratio of actual dose time to the characteristic dosing time. Default is 1.0 (dose duration equals the characteristic time). Must be non-negative.
- Dafloat, optional
Damkohler number. If provided, updates the model’s Da attribute and uses this value for the calculation. If None (default), uses the current model’s Da value.
Returns¶
- float
Surface coverage θ (dimensionless), bounded between 0 and 1. A value of 0 indicates no coverage, while 1 indicates complete monolayer saturation.
Examples¶
Calculate coverage at the end of dosing (t=1):
>>> model = FluidizedBedND(Da=2.0) >>> coverage = model.calc_coverage(t=1.0) >>> print(f"Coverage: {coverage:.3f}") Coverage: 0.797
Override the Damkohler number for a specific calculation:
>>> coverage = model.calc_coverage(t=1.0, Da=5.0) >>> print(f"Coverage with Da=5: {coverage:.3f}") Coverage with Da=5: 0.959
- model_kwd = ['dose', 'nondim']¶
- run(tmax=5, dt=0.01)[source]¶
Run complete simulation including coverage and precursor utilization
Executes the fluidized bed model simulation over a range of normalized dose times, computing both surface coverage and precursor utilization at each time step. This method provides comprehensive results for analyzing both coating efficiency and precursor usage in a batch reactor with well-mixed particles and plug flow precursor transport.
Parameters¶
- tmaxfloat, optional
Maximum normalized dose time for the simulation. Default is 5.0. Should be greater than 0. Larger values allow observation of near-saturation behavior.
- dtfloat, optional
Time step size for the simulation (dimensionless). Default is 0.01. Smaller values provide higher resolution but increase computation time. Must be positive and smaller than tmax.
Returns¶
- tndarray
Array of normalized dose times, shape (n,), where n = tmax/dt. Values range from 0 to (tmax - dt).
- coveragendarray
Array of surface coverage values θ at each time point, shape (n,). Each value is bounded between 0 and 1, representing fractional monolayer coverage.
- precursorndarray
Array of precursor utilization factors at each time point, shape (n,). Each value is bounded between 0 and 1, representing the fraction of precursor that has reacted with particle surfaces. Values closer to 0 indicate less efficient precursor usage.
Examples¶
Run a basic simulation with default parameters:
>>> model = FluidizedBedND(Da=2.0) >>> t, coverage, precursor = model.run() >>> print(f"Final coverage: {coverage[-1]:.3f}") Final coverage: 0.993
Notes¶
This method combines the functionality of calc_coverage() and precursor utilization calculations to provide a complete picture of the fluidized bed ALD process.
See Also¶
calc_coverage : Calculate coverage only saturation_curve : Calculate coverage without precursor data
- saturation_curve(tmax=5, dt=0.01)[source]¶
Calculate the saturation curve of the ALD process
Computes the relationship between normalized dose time and surface coverage, producing the characteristic saturation curve for the fluidized bed ALD process. This curve shows how coverage approaches saturation as dose time increases in a batch reactor with well-mixed particles and plug flow precursor transport.
Parameters¶
- tmaxfloat, optional
Maximum normalized dose time for the curve. Default is 5.0. Determines the extent of the curve. Larger values show near-saturation behavior but may be unnecessary if saturation is reached earlier.
- dtfloat, optional
Time step size (dimensionless). Default is 0.01. Smaller values provide smoother curves but increase computation time. Must be positive and smaller than tmax.
Returns¶
- tndarray
Array of normalized dose times, shape (n,), where n = tmax/dt. Values range from 0 to (tmax - dt).
- coveragendarray
Array of surface coverage values θ at each time point, shape (n,). Each value is bounded between 0 and 1. The coverage increases monotonically, approaching saturation at large dose times.
Examples¶
Generate a saturation curve with default parameters:
>>> model = FluidizedBedND(Da=2.0) >>> t, coverage = model.saturation_curve() >>> print(f"Coverage at t=1: {coverage[100]:.3f}") # dt=0.01, so index 100 is t=1 Coverage at t=1: 0.797
Create a high-resolution saturation curve:
>>> t, coverage = model.saturation_curve(tmax=3.0, dt=0.001) >>> import matplotlib.pyplot as plt >>> plt.plot(t, coverage) >>> plt.xlabel('Normalized dose time') >>> plt.ylabel('Surface coverage θ') >>> plt.title(f'Fluidized Bed ALD Saturation Curve (Da={model.Da})') >>> plt.grid(True) >>> plt.show()
See Also¶
run : Complete simulation including precursor utilization calc_coverage : Calculate coverage at a single time point
WellMixedParticleND¶
- class aldsim.core.particle.rotatingdrum.WellMixedParticleND(Da=None)[source]¶
Bases:
objectModel for batch particle coating under a well mixed reactor approximation.
Implementation of a non-dimensional model for particle coating by atomic layer deposition under a well mixed approximation for particle mixing and well stirred approximation for precursor transport. This model is applicable to rotating drum reactors and other systems where particles are thoroughly mixed and the gas phase is well stirred.
The model assumes a first-order irreversible Langmuir kinetics with the sticking probability value contained in the Damkohler number.
Parameters¶
- Dafloat, optional
Damkohler number, a dimensionless parameter representing the ratio of reaction rate to transport rate. Higher values indicate faster surface reactions relative to mass transport. Must be non-negative. If None, must be specified in subsequent method calls.
Attributes¶
- Dafloat
The Damkohler number for the system.
Examples¶
Create a WellMixedParticleND model with a Damkohler number of 2.0:
>>> model = WellMixedParticleND(Da=2.0) >>> coverage = model.calc_coverage(t=1.0) >>> print(f"Coverage: {coverage:.3f}") Coverage: 0.757
Calculate saturation curve over normalized dose time:
>>> t, coverage = model.saturation_curve(tmax=3.0, dt=0.1) >>> max_coverage = coverage[-1] >>> print(f"Maximum coverage: {max_coverage:.3f}") Maximum coverage: 0.950
- calc_coverage(Da=None, t=1)[source]¶
Calculate the surface coverage at a given normalized dose time
Computes the fractional surface coverage θ of particles by precursor molecules in the well-mixed batch reactor at a specified normalized dose time. The calculation uses an implicit solution solved numerically via bounded Newton’s method, accounting for the coupling between surface coverage and precursor depletion in the batch system.
Parameters¶
- Dafloat, optional
Damkohler number. If provided, updates the model’s Da attribute and uses this value for the calculation. If None (default), uses the current model’s Da value.
- tfloat, optional
Normalized dose time (dimensionless), defined as the ratio of actual dose time to the characteristic reaction time. Default is 1.0. Must be non-negative.
Returns¶
- float
Surface coverage θ (dimensionless), bounded between 0 and 1. A value of 0 indicates no coverage, while 1 indicates complete monolayer saturation.
Examples¶
Calculate coverage at unit dose time:
>>> model = WellMixedParticleND(Da=2.0) >>> coverage = model.calc_coverage(t=1.0) >>> print(f"Coverage: {coverage:.3f}") Coverage: 0.757
Override the Damkohler number for a specific calculation:
>>> coverage = model.calc_coverage(Da=5.0, t=1.0) >>> print(f"Coverage with Da=5: {coverage:.3f}") Coverage with Da=5: 0.924
See Also¶
run : Calculate coverage evolution over time saturation_curve : Calculate coverage vs. time relationship
- run(tmax=5, dt=0.01)[source]¶
Run complete simulation including coverage and precursor utilization
Executes the well-mixed batch reactor model simulation over a range of normalized dose times, computing both surface coverage and precursor utilization at each time step. The simulation uses ODE integration to track the evolution of the system, accounting for coupled precursor depletion and surface coverage buildup.
Parameters¶
- tmaxfloat, optional
Maximum normalized dose time for the simulation. Default is 5.0. Should be greater than 0. Larger values allow observation of near-saturation behavior in batch operation.
- dtfloat, optional
Time step size for output (dimensionless). Default is 0.01. Smaller values provide higher resolution but may increase computation time. Must be positive and smaller than tmax.
Returns¶
- tndarray
Array of normalized dose times, shape (n,) where n ≈ tmax/dt. Values range from 0 to approximately tmax.
- coveragendarray
Array of surface coverage values θ at each time point, shape (n,). Each value is bounded between 0 and 1, representing fractional monolayer coverage. Coverage increases with time.
- precursorndarray
Array of precursor utilization fractions at each time point, shape (n,). Each value is bounded between 0 and 1, representing the fraction of precursor that has been consumed (reacted with particles).
Examples¶
Run a basic simulation with default parameters:
>>> model = WellMixedParticleND(Da=2.0) >>> t, coverage, precursor = model.run() >>> print(f"Final coverage: {coverage[-1]:.3f}") Final coverage: 0.993
Run simulation with custom time range and resolution:
>>> t, coverage, precursor = model.run(tmax=3.0, dt=0.05)
See Also¶
calc_coverage : Calculate coverage at a single time point saturation_curve : Calculate coverage without precursor data saturation_curve_implicit : Alternative implicit saturation curve method
- saturation_curve(tmax=5, dt=0.01)[source]¶
Calculate the saturation curve of the batch ALD process
Computes the relationship between normalized dose time and surface coverage for the well-mixed batch reactor, producing the characteristic saturation curve. This curve shows how coverage builds up in batch operation as precursor is consumed and particles are coated.
Parameters¶
- tmaxfloat, optional
Maximum normalized dose time for the curve. Default is 5.0. Determines the extent of the curve. Larger values show near-saturation behavior but may be unnecessary if saturation is reached earlier in batch operation.
- dtfloat, optional
Time step size for output (dimensionless). Default is 0.01. Smaller values provide smoother curves but may increase computation time. Must be positive and smaller than tmax.
Returns¶
- tndarray
Array of normalized dose times, shape (n,) where n ≈ tmax/dt. Values range from 0 to approximately tmax.
- coveragendarray
Array of surface coverage values θ at each time point, shape (n,). Each value is bounded between 0 and 1. The coverage increases monotonically, approaching saturation as precursor is depleted in batch operation.
Examples¶
Generate a saturation curve with default parameters:
>>> model = WellMixedParticleND(Da=2.0) >>> t, coverage = model.saturation_curve() >>> print(f"Coverage at t=1: {coverage[100]:.3f}") # dt=0.01, index ≈100 Coverage at t=1: 0.757
Create a high-resolution saturation curve:
>>> t, coverage = model.saturation_curve(tmax=3.0, dt=0.001) >>> import matplotlib.pyplot as plt >>> plt.plot(t, coverage) >>> plt.xlabel('Normalized dose time') >>> plt.ylabel('Surface coverage θ') >>> plt.title(f'Batch ALD Saturation Curve (Da={model.Da})') >>> plt.grid(True) >>> plt.show()
See Also¶
run : Complete simulation including precursor utilization calc_coverage : Calculate coverage at a single time point saturation_curve_implicit : Implicit formulation of saturation curve
SpatialPlugFlow¶
- class aldsim.core.particle.spatialplugflow.SpatialPlugFlow(Da)[source]¶
Bases:
objectPlug flow model for particle coating using spatial ALD
Implementation of a non-dimensional model for particle coating by atomic layer deposition for moving particles under stratified mixing (homogeneous mixing only on the plane perpendicular to the direction of movement). Precursor transport is modeled using the plug flow approximation, with both precursor and particles moving along the same direction.
The model assumes a first-order irreversible Langmuir kinetics with the sticking probability value contained in the Damkohler number.
The normalized time in the model refers to the normalized residence time of particles in the reactor.
Parameters¶
- Dafloat
Damkohler number, a dimensionless parameter representing the ratio of reaction rate to transport rate. Higher values indicate faster surface reactions relative to mass transport. Must be non-negative.
Attributes¶
- Dafloat
The Damkohler number for the system.
Examples¶
Create a SpatialPlugFlow model with a Damkohler number of 2.0:
>>> model = SpatialPlugFlow(Da=2.0) >>> coverage = model.calc_coverage(t=1.0) >>> print(f"Coverage: {coverage:.3f}") Coverage: 0.667
Calculate saturation curve over normalized residence time:
>>> t, coverage = model.saturation_curve(tmax=3.0, dt=0.1) >>> max_coverage = coverage[-1] >>> print(f"Maximum coverage: {max_coverage:.3f}") Maximum coverage: 0.950
- calc_coverage(t=1, Da=None)[source]¶
Calculate the surface coverage at a given normalized residence time
Computes the fractional surface coverage θ of particles by precursor molecules in the plug flow reactor at a specified normalized residence time. The calculation uses analytical solutions for the plug flow model with first-order Langmuir kinetics.
Parameters¶
- tfloat, optional
Normalized residence time (dimensionless), defined as the ratio of actual residence time to the characteristic reactor time. Default is 1.0 (particles exit at the reactor characteristic time). Must be non-negative.
- Dafloat, optional
Damkohler number. If provided, updates the model’s Da attribute and uses this value for the calculation. If None (default), uses the current model’s Da value.
Returns¶
- float
Surface coverage θ (dimensionless), bounded between 0 and 1. A value of 0 indicates no coverage, while 1 indicates complete monolayer saturation.
Examples¶
Calculate coverage at the reactor exit (t=1):
>>> model = SpatialPlugFlow(Da=2.0) >>> coverage = model.calc_coverage(t=1.0) >>> print(f"Coverage: {coverage:.3f}") Coverage: 0.667
Override the Damkohler number for a specific calculation:
>>> coverage = model.calc_coverage(t=1.0, Da=5.0) >>> print(f"Coverage with Da=5: {coverage:.3f}") Coverage with Da=5: 0.833
- calc_precursor(t, Da=None)[source]¶
Calculate the fraction of unused precursor exiting the reactor
Computes the fraction of precursor molecules that pass through the reactor without reacting with particle surfaces. This quantity is important for understanding precursor efficiency and optimizing process economics.
Parameters¶
- tfloat
Normalized residence time (dimensionless), defined as the ratio of actual residence time to the characteristic reactor time. Must be non-negative.
- Dafloat, optional
Damkohler number. If provided, updates the model’s Da attribute and uses this value for the calculation. If None (default), uses the current model’s Da value.
Returns¶
- float
Fraction of unused precursor (dimensionless), bounded between 0 and 1. A value of 0 indicates complete precursor utilization (all precursor reacts), while 1 indicates no precursor consumption.
Examples¶
Calculate unused precursor at reactor exit:
>>> model = SpatialPlugFlow(Da=2.0) >>> unused = model.calc_precursor(t=1.0) >>> utilization = 1 - unused >>> print(f"Precursor utilization: {utilization:.1%}") Precursor utilization: 66.7%
See Also¶
calc_coverage : Calculate surface coverage run : Calculate both coverage and precursor utilization
- run(tmax=5, dt=0.01)[source]¶
Run complete simulation including coverage and precursor utilization
Executes the plug flow model simulation over a range of normalized residence times, computing both surface coverage and precursor utilization at each time step. This method provides comprehensive results for analyzing both coating efficiency and precursor usage.
Parameters¶
- tmaxfloat, optional
Maximum normalized residence time for the simulation. Default is 5.0. Should be greater than 0. Larger values allow observation of near-saturation behavior.
- dtfloat, optional
Time step size for the simulation (dimensionless). Default is 0.01. Smaller values provide higher resolution but increase computation time. Must be positive and smaller than tmax.
Returns¶
- tndarray
Array of normalized residence times, shape (n,), where n = tmax/dt. Values range from 0 to (tmax - dt).
- coveragendarray
Array of surface coverage values θ at each time point, shape (n,). Each value is bounded between 0 and 1, representing fractional monolayer coverage.
- precursorndarray
Array of unused precursor fractions at each time point, shape (n,). Each value is bounded between 0 and 1, representing the fraction of precursor that exits the reactor without reacting.
Examples¶
Run a basic simulation with default parameters:
>>> model = SpatialPlugFlow(Da=2.0) >>> t, coverage, precursor = model.run() >>> print(f"Final coverage: {coverage[-1]:.3f}") Final coverage: 0.993
Run simulation with custom time range and resolution:
>>> t, coverage, precursor = model.run(tmax=3.0, dt=0.05) >>> import matplotlib.pyplot as plt >>> plt.plot(t, coverage, label='Coverage') >>> plt.plot(t, precursor, label='Unused precursor') >>> plt.xlabel('Normalized residence time') >>> plt.ylabel('Fraction') >>> plt.legend() >>> plt.show()
Notes¶
This method combines the functionality of calc_coverage() and calc_precursor() to provide a complete picture of the ALD process.
See Also¶
calc_coverage : Calculate coverage only calc_precursor : Calculate precursor utilization only saturation_curve : Calculate coverage without precursor data
- saturation_curve(tmax=5, dt=0.01)[source]¶
Calculate the saturation curve of the ALD process
Computes the relationship between normalized residence time and surface coverage, producing the characteristic saturation curve for the ALD process. This curve shows how coverage approaches saturation as residence time increases.
Parameters¶
- tmaxfloat, optional
Maximum normalized residence time for the curve. Default is 5.0. Determines the extent of the curve. Larger values show near-saturation behavior but may be unnecessary if saturation is reached earlier.
- dtfloat, optional
Time step size (dimensionless). Default is 0.01. Smaller values provide smoother curves but increase computation time. Must be positive and smaller than tmax.
Returns¶
- tndarray
Array of normalized residence times, shape (n,), where n = tmax/dt. Values range from 0 to (tmax - dt).
- coveragendarray
Array of surface coverage values θ at each time point, shape (n,). Each value is bounded between 0 and 1. The coverage increases monotonically, approaching saturation at large residence times.
Examples¶
Generate a saturation curve with default parameters:
>>> model = SpatialPlugFlow(Da=2.0) >>> t, coverage = model.saturation_curve() >>> print(f"Coverage at t=1: {coverage[100]:.3f}") # dt=0.01, so index 100 is t=1 Coverage at t=1: 0.667
Create a high-resolution saturation curve:
>>> t, coverage = model.saturation_curve(tmax=3.0, dt=0.001) >>> import matplotlib.pyplot as plt >>> plt.plot(t, coverage) >>> plt.xlabel('Normalized residence time') >>> plt.ylabel('Surface coverage θ') >>> plt.title(f'ALD Saturation Curve (Da={model.Da})') >>> plt.grid(True) >>> plt.show()
See Also¶
run : Complete simulation including precursor utilization calc_coverage : Calculate coverage at a single time point
SpatialWellMixedND¶
- class aldsim.core.particle.spatialwellmixed.SpatialWellMixedND(Da=None)[source]¶
Bases:
WellMixedParticleNDModel for continuous particle coating under well stirred approximations.
Implementation of a non-dimensional model for particle coating by atomic layer deposition for moving particles under stratified mixing (homogeneous mixing only on the plane perpendicular to the direction of movement). Precursor transport is modeled using the well stirred approximation. This model is applicable to continuous flow systems where particles move through the reactor while the gas phase is well stirred.
The model assumes a first-order irreversible Langmuir kinetics with the sticking probability value contained in the Damkohler number.
The normalized time in the model refers to the normalized residence time of particles in the reactor.
This model is formally equivalent to a batch particle coating under the well stirred approximation (WellMixedParticleND) in which the normalized residence time is replaced by the normalized dose time. The mathematical formulation is identical, allowing SpatialWellMixed to inherit all methods from WellMixedParticleND.
Parameters¶
- Dafloat, optional
Damkohler number, a dimensionless parameter representing the ratio of reaction rate to transport rate. Higher values indicate faster surface reactions relative to mass transport. Must be non-negative. If None, must be specified in subsequent method calls.
Attributes¶
- Dafloat
The Damkohler number for the system.
Examples¶
Create a SpatialWellMixed model with a Damkohler number of 2.0:
>>> model = SpatialWellMixedND(Da=2.0) >>> coverage = model.calc_coverage(t=1.0) >>> print(f"Coverage: {coverage:.3f}") Coverage: 0.757
Calculate saturation curve over normalized residence time:
>>> t, coverage = model.saturation_curve(tmax=3.0, dt=0.1) >>> max_coverage = coverage[-1] >>> print(f"Maximum coverage: {max_coverage:.3f}") Maximum coverage: 0.950
See Also¶
WellMixedParticleND : Batch reactor model with identical mathematical formulation SpatialPlugFlow : Continuous model with plug flow precursor transport
ALD in high aspect ratio features¶
DiffusionViaND¶
- class aldsim.core.diffusion.DiffusionViaND(AR, p_stick0, p_rec0=0, p_rec1=0)[source]¶
Bases:
objectModel for ALD in high aspect ratio circular vias.
Implementation of a non-dimensional model for atomic layer deposition in high-aspect-ratio circular vias. The model uses a Knudsen diffusion transport model and self-limited surface reaction kinetics and surface recombination.
The model assumes a first-order irreversible Langmuir kinetics with the sticking probability value determining the reaction rate. It also supports recombination processes on both bare and reacted surface sites.
Parameters¶
- ARfloat
Aspect ratio of the circular via (depth/diameter). Higher values indicate deeper, narrower structures where diffusion limitations become more significant. Must be non-negative.
- p_stick0float
Sticking probability for the self-limited ALD process. Represents the probability that a precursor molecule will react when it encounters a surface site.
- p_rec0float, optional
Recombination probability on bare (unreacted) surface sites. Default is 0.
- p_rec1float, optional
Recombination probability on reacted surface sites. Default is 0.
Attributes¶
- ARfloat
The aspect ratio of the via.
- p_stick0float
The sticking probability of the ALD process.
- p_rec0float
The recombination probability on bare sites.
- p_rec1float
The recombination probability on reacted sites.
- dzfloat
Size of the discretized elements, normalized to the via diameter. Computed as 1/nsegments.
- nsegmentsint
Number of discretized elements per unit aspect ratio. Default is 4.
Examples¶
Create a DiffusionViaND model for a via with aspect ratio 10:
>>> model = DiffusionViaND(AR=10, p_stick0=0.05) >>> times, coverage = model.run(max_time=2.0) >>> print(f"Final mean coverage: {coverage[-1].mean():.3f}")
Model with recombination effects:
>>> model = DiffusionViaND(AR=20, p_stick0=0.03, p_rec0=0.01, p_rec1=0.05) >>> times, coverage = model.run_until_cov(max_cov=0.95) >>> print(f"Time to reach 95% coverage: {times[-1]:.3f}")
Notes¶
The model uses Knudsen diffusion to describe precursor transport inside the circular via. The governing equations are solved using a finite difference method with banded matrix solver for efficiency.
All time values in the model are normalized by a characteristic diffusion time scale.
- property dz¶
size of the elements (normalized to the diameter) used to solve the transport equation
- model_kwd = ['dose', 'nondim']¶
- property nsegments¶
Number of discretized elements per unit aspect ratio
- run(N=None, max_time=1, save_every=0.2, dt=0.05)[source]¶
Run simulation for a specified normalized time period
Executes the diffusion-reaction model for precursor transport and surface coverage evolution inside a high aspect ratio circular via. The simulation runs until the specified maximum normalized time is reached, saving coverage profiles at regular time intervals.
Parameters¶
- Nint, optional
Number of discretized segments along the via depth. If None (default), automatically calculated as 4 * AR to ensure adequate spatial resolution. Higher values provide better accuracy but increase computation time.
- max_timefloat, optional
Maximum normalized time for the simulation. Default is 1.0. Represents the duration of precursor exposure in normalized units. Must be positive.
- save_everyfloat, optional
Normalized time interval at which coverage profiles are saved. Default is 0.2. Smaller values provide more time resolution but increase memory usage. Must be positive and less than max_time.
- dtfloat, optional
Time step size for numerical integration (dimensionless). Default is 0.05. Smaller values improve accuracy but increase computation time. Must be positive and smaller than save_every.
Returns¶
- timeslist of float
List of normalized times corresponding to saved coverage profiles. Length matches the coverage list.
- coveragelist of ndarray
List of coverage arrays at saved time points. Each array has shape (N,) representing the coverage profile along the via depth, from the entrance (index 0) to the bottom (index N-1). Values are bounded between 0 and 1.
Examples¶
Run simulation with default parameters:
>>> model = DiffusionViaND(AR=10, p_stick0=0.05) >>> times, coverage = model.run() >>> print(f"Number of saved profiles: {len(coverage)}") Number of saved profiles: 6
Run with custom time parameters and higher resolution:
>>> model = DiffusionViaND(AR=15, p_stick0=0.03) >>> times, coverage = model.run(N=100, max_time=3.0, save_every=0.5) >>> final_coverage = coverage[-1] >>> print(f"Coverage at bottom: {final_coverage[-1]:.3f}")
See Also¶
run_until_cov : Run simulation until target coverage is reached
- run_until_cov(N=None, max_cov=0.99, save_every=0.2, dt=0.05)[source]¶
Run simulation until target mean coverage is reached
Executes the diffusion-reaction model for precursor transport and surface coverage evolution inside a high aspect ratio circular via. The simulation continues until the mean coverage across the via reaches the specified target value, saving coverage profiles at regular coverage intervals.
Parameters¶
- Nint, optional
Number of discretized segments along the via depth. If None (default), automatically calculated as 4 * AR to ensure adequate spatial resolution. Higher values provide better accuracy but increase computation time.
- max_covfloat, optional
Target mean coverage at which the simulation stops. Default is 0.99. Represents the spatially-averaged fractional surface coverage. Must be between 0 and 1.
- save_everyfloat, optional
Coverage interval at which profiles and times are saved. Default is 0.2. For example, with default value, profiles are saved when mean coverage reaches 0.2, 0.4, 0.6, 0.8, and the final target. Must be positive and less than max_cov.
- dtfloat, optional
Time step size for numerical integration (dimensionless). Default is 0.05. Smaller values improve accuracy but increase computation time.
Returns¶
- timeslist of float
List of normalized times corresponding to saved coverage profiles. Times increase monotonically. Length matches the coverage list.
- coveragelist of ndarray
List of coverage arrays at saved coverage intervals. Each array has shape (N,) representing the coverage profile along the via depth, from the entrance (index 0) to the bottom (index N-1). Values are bounded between 0 and 1.
Examples¶
Run simulation until 90% mean coverage:
>>> model = DiffusionViaND(AR=10, p_stick0=0.5) >>> times, coverage = model.run_until_cov(max_cov=0.9) >>> print(f"Time to reach 90% coverage: {times[-1]:.3f}") Time to reach 90% coverage: 2.345
Save coverage profiles every 10% increment:
>>> model = DiffusionViaND(AR=15, p_stick0=0.3, p_rec0=0.1) >>> times, coverage = model.run_until_cov(max_cov=0.95, save_every=0.1)
See Also¶
run : Run simulation for a specified time period