CVD/Transport.pm

filter: Statementstmt 42.8% 36 / 84 Branchbran 12.5% 1 / 8 Conditioncond 17.6% 9 / 51 MC/DCmcdc 0.0% 0 / 28 Subroutinesub 52.9% 9 / 17 Podpod 0.0% 0 / 10 totaltotal 27.7% 55 / 198 CC 30 SCAR 26.1
CC
30
Cov
32%
conformality_profile
30.0
knudsen_diffusivity
20.0
boundary_layer_thickness
20.0
CRAP 13.6
« CVD/Interface/OpenFOAM.pm ↑ Summary CVD.pm »
1 package Physics::CVD::Transport;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use List::Util qw(sum max min);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # ═══════════════════════════════════════════════════════════════════════════════
8 # Mass transport modeling for CVD
9 #
10 # Models:
11 # - Boundary layer diffusion (stagnation flow)
12 # - Feature-scale transport (Knudsen diffusion in trenches/vias)
13 # - Ballistic transport in molecular flow regime
14 # - Conformality and step coverage prediction
15 # ═══════════════════════════════════════════════════════════════════════════════
16  
17 1 ▶use constant KB => 1.380649e-23;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use constant PI => 3.14159265358979;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 1 ▶use constant R_GAS => 8.314462;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 1 ▶sub new {
Subroutine new: called CC=7 SCAR=23.2
Pod undocumented
22 1 my ($class, %opts) = @_;
23 my $self = bless {
24 temperature => $opts{temperature} // 700,
25 pressure => $opts{pressure} // 100,
26 verbose => $opts{verbose} // 0,
27 # Feature geometry
28 feature_type => $opts{feature_type} // 'trench', # trench, via, blanket
29 aspect_ratio => $opts{aspect_ratio} // 3.0,
30 1 ▶ feature_width => $opts{feature_width} // 0.1e-4, # cm (100nm)
Condition50%6/12
$opts{"temperature"} // 700
l!l
01
$opts{"pressure"} // 100
l!l
01
$opts{"verbose"} // 0
l!l
01
$opts{"feature_type"} // "trench"
l!l
01
$opts{"aspect_ratio"} // 3
l!l
10
$opts{"feature_width"} // "1e-05"
l!l
10
MC/DC0%0/1
$opts{"temperature"} // 700
$opts{"temperature"}
MC/DC0%0/1
$opts{"pressure"} // 100
$opts{"pressure"}
MC/DC0%0/1
$opts{"verbose"} // 0
$opts{"verbose"}
MC/DC0%0/1
$opts{"feature_type"} // "trench"
$opts{"feature_type"}
MC/DC0%0/1
$opts{"aspect_ratio"} // 3
$opts{"aspect_ratio"}
MC/DC0%0/1
$opts{"feature_width"} // "1e-05"
$opts{"feature_width"}
Truth table50%1/2
A
A= $opts{"temperature"}
Aresult
11
00
Truth table50%1/2
A
A= $opts{"pressure"}
Aresult
11
00
Truth table50%1/2
A
A= $opts{"verbose"}
Aresult
11
00
Truth table50%1/2
A
A= $opts{"feature_type"}
Aresult
11
00
Truth table50%1/2
A
A= $opts{"aspect_ratio"}
Aresult
11
00
Truth table50%1/2
A
A= $opts{"feature_width"}
Aresult
11
00
31 }, $class;
32 1 return $self;
33 }
34  
35 # Knudsen diffusivity in a feature (cm²/s)
36 0 ▶sub knudsen_diffusivity {
Subroutine knudsen_diffusivity: not called CC=4 SCAR=30.0
Pod undocumented
37 0 my ($self, %opts) = @_;
38 0 ▶ my $T = $opts{T} // $self->{temperature};
Condition0%0/3
$opts{"T"} // $self->{"temperature"}
l!l&&r!l&&!r
000
MC/DC0%0/2
$opts{"T"} // $self->{"temperature"}
$opts{"T"} $self->{"temperature"}
Truth table0%0/3
A // B
A= $opts{"T"}B= $self->{"temperature"}
ABresult
1X1
011
000
39 0 ▶ my $width = $opts{width} // $self->{feature_width};
Condition0%0/3
$opts{"width"} // $self->{"feature_width"}
l!l&&r!l&&!r
000
MC/DC0%0/2
$opts{"width"} // $self->{"feature_width"}
$opts{"width"} $self->{"feature_width"}
Truth table0%0/3
A // B
A= $opts{"width"}B= $self->{"feature_width"}
ABresult
1X1
011
000
40 0 ▶ my $mass = $opts{mass} // 44; # amu
Condition0%0/2
$opts{"mass"} // 44
l!l
00
MC/DC0%0/1
$opts{"mass"} // 44
$opts{"mass"}
Truth table0%0/2
A
A= $opts{"mass"}
Aresult
11
00
41 0 my $m_kg = $mass * 1.66054e-27;
42 # D_Kn = (w/3) × sqrt(8kT/(πm))
43 0 return ($width / 3.0) * sqrt(8.0 * KB * $T / (PI() * $m_kg));
44 }
45  
46 # Effective diffusivity (Bosanquet interpolation)
47 0 ▶sub effective_diffusivity {
Subroutine effective_diffusivity: not called CC=2 SCAR=17.9
Pod undocumented
48 0 my ($self, %opts) = @_;
49 0 ▶ my $D_bulk = $opts{D_bulk} // 10.0; # cm²/s (gas-phase)
Condition0%0/2
$opts{"D_bulk"} // 10
l!l
00
MC/DC0%0/1
$opts{"D_bulk"} // 10
$opts{"D_bulk"}
Truth table0%0/2
A
A= $opts{"D_bulk"}
Aresult
11
00
50 0 my $D_Kn = $self->knudsen_diffusivity(%opts);
51 # 1/D_eff = 1/D_bulk + 1/D_Kn
52 0 return 1.0 / (1.0/$D_bulk + 1.0/$D_Kn);
53 }
54  
55 # Step coverage for a trench/via with first-order surface kinetics
56 # Uses the Yanguas-Gil analytical model
57 1 ▶sub step_coverage {
Subroutine step_coverage: called CC=5 SCAR=17.6
Pod undocumented
58 1 my ($self, %opts) = @_;
59 1 ▶ my $AR = $opts{aspect_ratio} // $self->{aspect_ratio};
Condition33%1/3
$opts{"aspect_ratio"} // $self->{"aspect_ratio"}
l!l&&r!l&&!r
010
MC/DC0%0/2
$opts{"aspect_ratio"} // $self->{"aspect_ratio"}
$opts{"aspect_ratio"} $self->{"aspect_ratio"}
Truth table33%1/3
A // B
A= $opts{"aspect_ratio"}B= $self->{"aspect_ratio"}
ABresult
1X1
011
000
60 1 ▶ my $S = $opts{sticking_coeff} // 0.1;
Condition50%1/2
$opts{"sticking_coeff"} // "0.1"
l!l
10
MC/DC0%0/1
$opts{"sticking_coeff"} // "0.1"
$opts{"sticking_coeff"}
Truth table50%1/2
A
A= $opts{"sticking_coeff"}
Aresult
11
00
61 1 ▶ my $width = $opts{width} // $self->{feature_width};
Condition33%1/3
$opts{"width"} // $self->{"feature_width"}
l!l&&r!l&&!r
010
MC/DC0%0/2
$opts{"width"} // $self->{"feature_width"}
$opts{"width"} $self->{"feature_width"}
Truth table33%1/3
A // B
A= $opts{"width"}B= $self->{"feature_width"}
ABresult
1X1
011
000
62  
63 # Modified Thiele modulus for CVD in features
64 # φ = AR × sqrt(S / (2-S)) for a trench
65 1 my $phi;
66 1 ▶ if ($self->{feature_type} eq 'via') {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'feature_type'} eq 'via') { } 0 1 1
67 0 $phi = $AR * sqrt($S);
68 } else {
69 1 $phi = $AR * sqrt($S / (2.0 - $S));
70 }
71  
72 # Bottom/top deposition rate ratio
73 1 my $sc = 1.0 / (1.0 + $phi**2 / 6.0); # parabolic approximation
74 1 $sc = max($sc, 0.01);
75 1 $sc = min($sc, 1.0);
76 1 return $sc;
77 }
78  
79 # Full conformality profile along feature depth
80 0 ▶sub conformality_profile {
Subroutine conformality_profile: not called CC=5 SCAR=34.0
Pod undocumented
81 0 my ($self, %opts) = @_;
82 0 ▶ my $AR = $opts{aspect_ratio} // $self->{aspect_ratio};
Condition0%0/3
$opts{"aspect_ratio"} // $self->{"aspect_ratio"}
l!l&&r!l&&!r
000
MC/DC0%0/2
$opts{"aspect_ratio"} // $self->{"aspect_ratio"}
$opts{"aspect_ratio"} $self->{"aspect_ratio"}
Truth table0%0/3
A // B
A= $opts{"aspect_ratio"}B= $self->{"aspect_ratio"}
ABresult
1X1
011
000
83 0 ▶ my $S = $opts{sticking_coeff} // 0.1;
Condition0%0/2
$opts{"sticking_coeff"} // "0.1"
l!l
00
MC/DC0%0/1
$opts{"sticking_coeff"} // "0.1"
$opts{"sticking_coeff"}
Truth table0%0/2
A
A= $opts{"sticking_coeff"}
Aresult
11
00
84 0 ▶ my $n_pts = $opts{points} // 20;
Condition0%0/2
$opts{"points"} // 20
l!l
00
MC/DC0%0/1
$opts{"points"} // 20
$opts{"points"}
Truth table0%0/2
A
A= $opts{"points"}
Aresult
11
00
85  
86 0 my @profile;
87 0 for my $i (0 .. $n_pts - 1) {
88 0 my $x = $i / ($n_pts - 1); # 0=top, 1=bottom
89 0 my $depth = $x * $AR;
90 # Exponential flux attenuation
91 0 my $flux_ratio = exp(-$depth * sqrt($S));
92 0 push @profile, { position => $x, flux_ratio => $flux_ratio };
93 }
94 0 return \@profile;
95 }
96  
97 # Boundary layer thickness (cm) — stagnation flow approximation
98 0 ▶sub boundary_layer_thickness {
Subroutine boundary_layer_thickness: not called CC=4 SCAR=30.0
Pod undocumented
99 0 my ($self, %opts) = @_;
100 0 ▶ my $D = $opts{diffusivity} // 10.0; # cm²/s
Condition0%0/2
$opts{"diffusivity"} // 10
l!l
00
MC/DC0%0/1
$opts{"diffusivity"} // 10
$opts{"diffusivity"}
Truth table0%0/2
A
A= $opts{"diffusivity"}
Aresult
11
00
101 0 ▶ my $v = $opts{velocity} // 10.0; # cm/s
Condition0%0/2
$opts{"velocity"} // 10
l!l
00
MC/DC0%0/1
$opts{"velocity"} // 10
$opts{"velocity"}
Truth table0%0/2
A
A= $opts{"velocity"}
Aresult
11
00
102 0 ▶ my $L = $opts{length} // 15.0; # cm (wafer radius)
Condition0%0/2
$opts{"length"} // 15
l!l
00
MC/DC0%0/1
$opts{"length"} // 15
$opts{"length"}
Truth table0%0/2
A
A= $opts{"length"}
Aresult
11
00
103 # δ ≈ sqrt(D × L / v)
104 0 return sqrt($D * $L / $v);
105 }
106  
107 # Mass transfer coefficient (cm/s)
108 0 ▶sub mass_transfer_coeff {
Subroutine mass_transfer_coeff: not called CC=3 SCAR=24.8
Pod undocumented
109 0 my ($self, %opts) = @_;
110 0 ▶ my $D = $opts{diffusivity} // 10.0;
Condition0%0/2
$opts{"diffusivity"} // 10
l!l
00
MC/DC0%0/1
$opts{"diffusivity"} // 10
$opts{"diffusivity"}
Truth table0%0/2
A
A= $opts{"diffusivity"}
Aresult
11
00
111 0 my $delta = $self->boundary_layer_thickness(%opts);
112 0 ▶ return ($delta > 0) ? $D / $delta : 0;
Branch: 1 branch
BranchTrueFalseTotal
$delta > 0 ? : 0 0 0
113 }
114  
115 # Deposition rate profile across wafer (normalized)
116 0 ▶sub wafer_uniformity {
Subroutine wafer_uniformity: not called CC=4 SCAR=30.0
Pod undocumented
117 0 my ($self, %opts) = @_;
118 0 ▶ my $n_pts = $opts{points} // 10;
Condition0%0/2
$opts{"points"} // 10
l!l
00
MC/DC0%0/1
$opts{"points"} // 10
$opts{"points"}
Truth table0%0/2
A
A= $opts{"points"}
Aresult
11
00
119 0 ▶ my $Da = $opts{damkohler} // 1.0;
Condition0%0/2
$opts{"damkohler"} // 1
l!l
00
MC/DC0%0/1
$opts{"damkohler"} // 1
$opts{"damkohler"}
Truth table0%0/2
A
A= $opts{"damkohler"}
Aresult
11
00
120  
121 0 my @profile;
122 0 for my $i (0 .. $n_pts - 1) {
123 0 my $r = $i / ($n_pts - 1); # 0=center, 1=edge
124 # Depletion effect: rate decreases toward center for Da>1
125 0 my $depletion = exp(-$Da * (1 - $r));
126 0 push @profile, { radius => $r, relative_rate => $depletion };
127 }
128 0 return \@profile;
129 }
130  
131 # Predict regime: reaction-limited vs transport-limited
132 0 ▶sub regime {
Subroutine regime: not called CC=4 SCAR=30.0
Pod undocumented
133 0 my ($self, %opts) = @_;
134 0 ▶ my $Da = $opts{damkohler} // 1.0;
Condition0%0/2
$opts{"damkohler"} // 1
l!l
00
MC/DC0%0/1
$opts{"damkohler"} // 1
$opts{"damkohler"}
Truth table0%0/2
A
A= $opts{"damkohler"}
Aresult
11
00
135 0 ▶ if ($Da < 0.1) {
Branch: 2 branches
BranchTrueFalseTotal
if ($Da < 0.1) { } 0 0 0
elsif ($Da > 10) { } 0 0 0
136 0 return 'reaction-limited';
137 } elsif ($Da > 10) {
138 0 return 'transport-limited';
139 } else {
140 0 return 'mixed';
141 }
142 }
143  
144 0 ▶sub stats {
Subroutine stats: not called CC=1 SCAR=6.9
Pod undocumented
145 0 my ($self) = @_;
146 return {
147 feature_type => $self->{feature_type},
148 aspect_ratio => $self->{aspect_ratio},
149 feature_width => $self->{feature_width},
150 0 D_Kn => $self->knudsen_diffusivity,
151 step_coverage => $self->step_coverage,
152 };
153 }
154  
155 1 1;
« CVD/Interface/OpenFOAM.pm ↑ Summary CVD.pm »