Skip to main content

GapPatch

Struct GapPatch 

Source
pub struct GapPatch {
    pub pairs: usize,
    pub span: (f64, f64),
    pub distance: f64,
    pub rectangular: bool,
}
Expand description

One patch of a clearance: two facing surfaces and how far apart they are.

A gap is found pair by pair, along one axis, one cell face against the one directly across from it. A patch is what those pairs add up to — a connected sheet of facing area at one separation, which is the shape a view factor is a statement about.

Fields§

§pairs: usize

How many facing cell pairs are in it.

§span: (f64, f64)

The patch’s extent across the gap, in metres — the bounding box of the facing cells.

§distance: f64

How far the two surfaces are apart, in metres.

§rectangular: bool

Whether the facing cells fill their bounding box.

view_factor is exact for a rectangle and an upper bound for anything else, because a patch with a bite out of it sees less of itself than its bounding box does. Reported rather than corrected: an L-shaped clearance is not a shape the closed form covers, and a number invented for it would be worth less than knowing it is a bound.

Implementations§

Source§

impl GapPatch

Source

pub fn view_factor(&self) -> f64

The view factor from one of the facing surfaces to the other, F₁₂.

The exact closed form for two equal, parallel, directly-opposed rectangles — which is the geometry the pairing produces by construction, since a pair is a cell and the cell across from it. With X = a/c and Y = b/c:

F = 2/(πXY) · [ ln √((1+X²)(1+Y²)/(1+X²+Y²))
                + X√(1+Y²)·atan(X/√(1+Y²)) + Y√(1+X²)·atan(Y/√(1+X²))
                − X·atan X − Y·atan Y ]

This is not what the exchange is charged, and the difference is the point. What the block charges is F̄ = 1, which is exact when the sides of the gap are mirrors — and the block’s own outer faces are exactly that, because an insulated boundary is implemented as a mirror and a mirror extends the two surfaces to infinity. F₁₂ is what the same pair would exchange with nothing at the sides, open to space. The two agree when the gap is narrow compared with the surfaces and diverge without limit when it is not, so this is the number that says how much of the answer is resting on reading the boundary one way.

Trait Implementations§

Source§

impl Clone for GapPatch

Source§

fn clone(&self) -> GapPatch

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for GapPatch

Source§

impl Debug for GapPatch

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for GapPatch

Source§

fn eq(&self, other: &GapPatch) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for GapPatch

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.