Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions crates/rustfoil-coupling/src/global_newton.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ pub struct GlobalNewtonSystem {
pub current_iteration: usize,
/// ANTE: base thickness contribution at blunt trailing edge (XFOIL WGAP(1))
pub ante: f64,
/// Forced transition arc-length on upper surface (from XSTRIP).
/// `None` falls back to TE arc length (default XFOIL behaviour).
pub xiforc_upper: Option<f64>,
/// Forced transition arc-length on lower surface (from XSTRIP).
pub xiforc_lower: Option<f64>,
}

impl GlobalNewtonSystem {
Expand Down Expand Up @@ -189,6 +194,8 @@ impl GlobalNewtonSystem {
// Current iteration - set in build_global_system
current_iteration: 0,
ante: 0.0,
xiforc_upper: None,
xiforc_lower: None,
}
}

Expand Down Expand Up @@ -790,9 +797,9 @@ impl GlobalNewtonSystem {
let is_transition_interval =
!s1.is_turbulent && !s1.is_wake && s2.is_turbulent && !s2.is_wake;
let x_forced = if surface == 0 {
stations.get(self.iblte_upper).map(|s| s.x)
self.xiforc_upper.or_else(|| stations.get(self.iblte_upper).map(|s| s.x))
} else {
stations.get(self.iblte_lower).map(|s| s.x)
self.xiforc_lower.or_else(|| stations.get(self.iblte_lower).map(|s| s.x))
};
let live_transition = if is_transition_interval {
Some(trchek2_full(
Expand Down
Loading
Loading