<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>압력강하 &#8211; MyEngNote</title>
	<atom:link href="https://myengnote.com/tag/%ec%95%95%eb%a0%a5%ea%b0%95%ed%95%98/feed/" rel="self" type="application/rss+xml" />
	<link>https://myengnote.com</link>
	<description></description>
	<lastBuildDate>Wed, 08 Jul 2026 04:42:20 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>배관 마찰손실 계산기 &#038; 시뮬레이터</title>
		<link>https://myengnote.com/pipe-friction-pressure-drop-darcy-weisbach/</link>
					<comments>https://myengnote.com/pipe-friction-pressure-drop-darcy-weisbach/#respond</comments>
		
		<dc:creator><![CDATA[동동]]></dc:creator>
		<pubDate>Sun, 21 Jun 2026 23:25:42 +0000</pubDate>
				<category><![CDATA[공학계산기]]></category>
		<category><![CDATA[공학설계]]></category>
		<category><![CDATA[달시바이스바하]]></category>
		<category><![CDATA[마찰손실]]></category>
		<category><![CDATA[압력강하]]></category>
		<category><![CDATA[유체역학]]></category>
		<category><![CDATA[조도]]></category>
		<guid isPermaLink="false">https://myengnote.com/pipe-friction-pressure-drop-darcy-weisbach/</guid>

					<description><![CDATA[배관 구경, 배관 길이, 설계 유량 및 재질별 표면 조도(ε)를 대입하여 레이놀즈수(Re) 판정, Haaland 공식에 의한 Darcy 마찰계수(f), 배관 마찰 압력 손실을 실시간 해석하는 엔지니어링 계산기입니다. <a href="https://myengnote.com/pipe-friction-pressure-drop-darcy-weisbach/" style="text-decoration:none; color:#0073aa; font-weight:bold;">[본문 전체보기 >]</a>]]></description>
										<content:encoded><![CDATA[
<h2 style="font-size: 1.6em; font-weight: 800; color: #0c0e25; border-bottom: 2px solid #00f2fe; padding-bottom: 8px; margin-bottom: 20px;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f680.png" alt="🚀" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 배관 마찰손실 계산기 &#038; 시뮬레이터</h2>


<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&#038;family=Outfit:wght@400;500;600;700;800&#038;display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
/* Scoped & Isolated Styles for pipe-friction-wrapper */
        /* Modern Reset and Design Tokens */
        .pipe-friction-wrapper *, .pipe-friction-wrapper *::before, .pipe-friction-wrapper *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        .pipe-friction-wrapper {
            --color-bg-dark: #f8f9fd;
            --color-bg-deep: #ffffff;
            --color-panel-bg: rgba(255, 255, 255, 0.85);
            --color-border: rgba(0, 0, 0, 0.06);
            --color-border-hover: rgba(0, 0, 0, 0.12);
            --color-text-main: #1e293b;
            --color-text-muted: #475569;
            --color-text-dark: #94a3b8;
            --color-cyan: #0284c7;
            --color-cyan-glow: rgba(2, 132, 199, 0.15);
            --color-magenta: #db2777;
            --color-magenta-glow: rgba(219, 39, 119, 0.15);
            --color-purple: #7c3aed;
            --color-purple-glow: rgba(124, 58, 237, 0.12);
            --color-success: #10b981;
            --color-warning: #f59e0b;
            --gradient-primary: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-purple) 100%);
            --gradient-accent: linear-gradient(135deg, var(--color-magenta) 0%, var(--color-purple) 100%);
            --gradient-panel: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.95) 100%);
            --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            --shadow-neon-cyan: 0 0 15px var(--color-cyan-glow);
            --shadow-neon-magenta: 0 0 15px var(--color-magenta-glow);
            --shadow-card: 0 8px 32px 0 rgba(15, 23, 42, 0.05);
            --blur-glass: blur(16px);
        }
        .pipe-friction-wrapper {
            background-color: var(--color-bg-dark);
            color: var(--color-text-main);
            font-family: var(--font-body);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            overflow-x: hidden;
            position: relative;
        }
        .app-background-glow {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            overflow: hidden;
            pointer-events: none;
        }
        .app-background-glow::before, 
        .app-background-glow::after {
            content: '';
            position: absolute;
            width: 600px;
            height: 600px;
            border-radius: 50%;
            filter: blur(140px);
            opacity: 0.15;
        }
        .app-background-glow::before {
            background: var(--color-cyan);
            top: -10%;
            right: -5%;
            animation: pulse-slow 15s infinite alternate;
        }
        .app-background-glow::after {
            background: var(--color-purple);
            bottom: -10%;
            left: -5%;
            animation: pulse-slow 20s infinite alternate-reverse;
        }
        @keyframes pulse-slow {
            0% { transform: scale(1) translate(0, 0); opacity: 0.12; }
            100% { transform: scale(1.2) translate(50px, 50px); opacity: 0.22; }
        }
        .app-container {
            width: 100%;
            max-width: 1440px;
            padding: 24px;
            display: flex;
            flex-direction: column;
            gap: 24px;
        }
        .app-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 24px;
            background: var(--color-panel-bg);
            backdrop-filter: var(--blur-glass);
            border: 1px solid var(--color-border);
            border-radius: 16px;
            box-shadow: var(--shadow-card);
        }
        .logo-area {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        .logo-icon {
            font-size: 32px;
            background: linear-gradient(135deg, var(--color-cyan), var(--color-purple));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .logo-area h1 {
            font-family: var(--font-heading);
            font-weight: 800;
            font-size: 24px;
            letter-spacing: 1px;
            background: linear-gradient(90deg, var(--color-text-main), var(--color-text-muted));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .logo-area .subtitle {
            font-size: 12px;
            color: var(--color-text-muted);
            font-weight: 500;
            letter-spacing: 0.5px;
        }
        .header-badge {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(16, 185, 129, 0.1);
            border: 1px solid rgba(16, 185, 129, 0.2);
            padding: 6px 14px;
            border-radius: 20px;
        }
        .pulse-dot {
            width: 8px;
            height: 8px;
            background-color: var(--color-success);
            border-radius: 50%;
            box-shadow: 0 0 10px var(--color-success);
            animation: pulse-dot-anim 1.5s infinite;
        }
        @keyframes pulse-dot-anim {
            0% { transform: scale(0.9); opacity: 0.6; }
            50% { transform: scale(1.2); opacity: 1; }
            100% { transform: scale(0.9); opacity: 0.6; }
        }
        .badge-text {
            font-size: 11px;
            font-weight: 600;
            color: var(--color-success);
            letter-spacing: 0.5px;
        }
        .app-main-grid {
            display: grid;
            grid-template-columns: 340px 1fr 340px;
            gap: 24px;
            align-items: start;
        }
        .panel {
            background: var(--gradient-panel);
            backdrop-filter: var(--blur-glass);
            border: 1px solid var(--color-border);
            border-radius: 20px;
            padding: 24px;
            box-shadow: var(--shadow-card);
            display: flex;
            flex-direction: column;
            gap: 20px;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }
        .panel:hover {
            border-color: var(--color-border-hover);
        }
        .panel-header {
            display: flex;
            align-items: center;
            gap: 12px;
            border-bottom: 1px solid var(--color-border);
            padding-bottom: 14px;
        }
        .panel-header i {
            font-size: 18px;
        }
        .panel-header h2 {
            font-family: var(--font-heading);
            font-size: 18px;
            font-weight: 600;
            letter-spacing: 0.5px;
        }
        .text-cyan { color: var(--color-cyan); }
        .text-magenta { color: var(--color-magenta); }
        .text-purple { color: var(--color-purple); }
        .control-panel {
            grid-column: 1;
        }
        .input-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .input-label-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .input-label-row label {
            font-size: 13px;
            font-weight: 600;
            color: var(--color-text-main);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .helper-text {
            font-size: 10px;
            color: var(--color-text-muted);
            font-weight: 500;
        }
                .number-input-wrapper {
            display: flex;
            position: relative;
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid var(--color-border);
            background: #ffffff;
            transition: all 0.2s ease;
        }
        .number-input-wrapper:focus-within {
            border-color: var(--color-cyan);
            box-shadow: 0 0 10px var(--color-cyan-glow);
        }
        .number-input-wrapper:focus-within {
            border-color: var(--color-cyan);
            box-shadow: 0 0 10px var(--color-cyan-glow);
        }
                .custom-number-input {
            flex: 1;
            width: 0;
            min-width: 0;
            background: #f8fafc !important;
            border: none !important;
            outline: none !important;
            color: #0f172a !important;
            padding: 10px 14px !important;
            font-family: var(--font-body) !important;
            font-size: 15px !important;
            font-weight: 700 !important;
            text-align: right !important;
            box-shadow: none !important;
            -webkit-appearance: none !important;
            -moz-appearance: textfield !important;
        }
        .custom-number-input::-webkit-outer-spin-button,
        .custom-number-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .custom-number-input::-webkit-outer-spin-button,
        .custom-number-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
                .unit-badge {
            background: rgba(0, 0, 0, 0.03);
            color: var(--color-text-muted);
            font-size: 11px;
            font-weight: 700;
            padding: 0 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-left: 1px solid var(--color-border);
            pointer-events: none;
            flex-shrink: 0;
        }
        .unit-select-badge {
            background: rgba(0, 0, 0, 0.03);
            color: var(--color-text-muted);
            font-size: 11px;
            font-weight: 700;
            padding: 0 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: none;
            border-left: 1px solid var(--color-border);
            outline: none;
            cursor: pointer;
            flex-shrink: 0;
            font-family: var(--font-body);
            transition: all 0.2s ease;
        }
        .unit-select-badge:hover {
            background: rgba(0, 0, 0, 0.06);
            color: var(--color-text-main);
        }
        .custom-slider {
            -webkit-appearance: none;
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: rgba(0, 0, 0, 0.05);
            outline: none;
            margin: 8px 0;
            transition: background 0.2s ease;
        }
        .custom-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            cursor: pointer;
            transition: transform 0.1s ease, box-shadow 0.2s ease;
        }
        #slider-d::-webkit-slider-thumb {
            background: var(--color-cyan);
            box-shadow: 0 0 10px var(--color-cyan);
        }
        #slider-d::-webkit-slider-thumb:hover { transform: scale(1.2); }
        #slider-l::-webkit-slider-thumb {
            background: var(--color-purple);
            box-shadow: 0 0 10px var(--color-purple);
        }
        #slider-l::-webkit-slider-thumb:hover { transform: scale(1.2); }
        #slider-q::-webkit-slider-thumb {
            background: var(--color-success);
            box-shadow: 0 0 10px var(--color-success);
        }
        #slider-q::-webkit-slider-thumb:hover { transform: scale(1.2); }
        #slider-rough::-webkit-slider-thumb {
            background: var(--color-magenta);
            box-shadow: 0 0 10px var(--color-magenta);
        }
        #slider-rough::-webkit-slider-thumb:hover { transform: scale(1.2); }
        .presets-section {
            display: flex;
            flex-direction: column;
            gap: 12px;
            border-top: 1px solid var(--color-border);
            padding-top: 18px;
        }
        .presets-section h3 {
            font-size: 13px;
            font-weight: 700;
            color: var(--color-text-main);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .presets-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 8px;
        }
        .preset-btn {
            background: rgba(0, 0, 0, 0.015);
            border: 1px solid var(--color-border);
            border-radius: 10px;
            padding: 10px 12px;
            cursor: pointer;
            color: var(--color-text-main);
            display: flex;
            align-items: center;
            gap: 12px;
            text-align: left;
            transition: all 0.2s ease;
        }
        .preset-btn:hover {
            background: rgba(0, 0, 0, 0.04);
            transform: translateX(4px);
        }
        .preset-btn.active {
            background: linear-gradient(90deg, var(--color-cyan-glow), var(--color-purple-glow));
            border-color: var(--color-cyan);
            box-shadow: 0 0 10px var(--color-cyan-glow);
        }
        .preset-icon {
            width: 28px;
            height: 28px;
            background: rgba(0, 0, 0, 0.02);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            color: var(--color-cyan);
        }
        .preset-btn:hover .preset-icon, .preset-btn.active .preset-icon {
            background: var(--gradient-primary);
            color: #fff;
        }
        .preset-name {
            font-size: 12px;
            font-weight: 600;
        }
        .simulation-panel {
            grid-column: 2;
            align-self: start;
            justify-content: flex-start;
        }
        .simulation-panel .panel-header {
            justify-content: space-between;
        }
        .canvas-scale-indicator {
            font-size: 11px;
            color: var(--color-text-muted);
            background: rgba(0, 0, 0, 0.02);
            padding: 4px 10px;
            border-radius: 6px;
            border: 1px solid var(--color-border);
        }
        .canvas-wrapper {
            position: relative;
            width: 100%;
            background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%);
            border: 1px solid rgba(0, 0, 0, 0.06);
            border-radius: 16px;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        #physics-canvas {
            display: block;
            width: 100%;
            height: auto;
            aspect-ratio: 16 / 10;
        }
        .simulation-metrics-strip {
            display: flex;
            background: rgba(0, 0, 0, 0.01);
            border: 1px solid var(--color-border);
            border-radius: 12px;
            padding: 12px 20px;
            justify-content: space-around;
            align-items: center;
            gap: 10px;
            margin-top: 10px;
        }
        .mini-metric {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            text-align: center;
        }
        .mini-metric .label {
            font-size: 10px;
            font-weight: 600;
            color: var(--color-text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .mini-metric .value {
            font-size: 14px;
            font-weight: 700;
            color: var(--color-text-main);
            font-family: var(--font-heading);
        }
        .mini-divider {
            width: 1px;
            height: 24px;
            background: rgba(0, 0, 0, 0.03);
        }
        .loss-readout-box {
            background: linear-gradient(135deg, rgba(219, 39, 119, 0.08) 0%, rgba(124, 58, 237, 0.04) 100%);
            border: 1px solid rgba(219, 39, 119, 0.25);
            border-radius: 16px;
            padding: 20px;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            box-shadow: 0 0 15px rgba(219, 39, 119, 0.05);
        }
        .loss-title {
            font-size: 11px;
            font-weight: 700;
            color: var(--color-magenta);
            letter-spacing: 1px;
            text-transform: uppercase;
        }
        .loss-value {
            font-family: var(--font-heading);
            font-weight: 800;
            font-size: 26px;
            background: linear-gradient(90deg, var(--color-text-main), var(--color-magenta));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .loss-type {
            font-size: 11px;
            font-weight: 700;
            padding: 4px 12px;
            border-radius: 20px;
            color: #fff;
            background: var(--color-magenta);
        }
        .results-grid {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .result-card {
            background: rgba(255, 255, 255, 0.85);
            border: 1px solid var(--color-border);
            border-radius: 12px;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 16px;
            transition: all 0.2s ease;
        }
        .result-card:hover {
            transform: translateY(-2px);
            border-color: rgba(2, 132, 199, 0.2);
            background: rgba(2, 132, 199, 0.03);
        }
        .card-icon {
            width: 38px;
            height: 38px;
            background: rgba(0, 0, 0, 0.015);
            border: 1px solid var(--color-border);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: var(--color-text-muted);
        }
        .card-content {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .card-unit {
            font-size: 11px;
            font-weight: 600;
            color: var(--color-text-muted);
        }
        .card-value {
            font-family: var(--font-heading);
            font-weight: 700;
            font-size: 17px;
            color: var(--color-text-main);
        }
        .formula-card {
            background: rgba(0, 0, 0, 0.01);
            border: 1px solid var(--color-border);
            border-radius: 12px;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            font-size: 12px;
        }
        .formula-card h4 {
            font-weight: 700;
            color: var(--color-text-main);
        }
        .formula-equation {
            font-family: monospace;
            color: var(--color-cyan);
            font-size: 13px;
            background: #f8fafc;
            padding: 8px 10px;
            border-radius: 6px;
            border: 1px solid var(--color-border);
            text-align: center;
        }
        /* Container Query */
        @container friction-container (max-width: 1100px) {
            .app-main-grid {
                grid-template-columns: 1fr 1fr;
                gap: 20px;
            }
            .control-panel {
                grid-column: 1;
            }
            .simulation-panel {
                grid-column: 2;
                align-self: start;
            }
            .results-panel {
                grid-column: 1 / span 2;
                display: grid;
                grid-template-columns: 1fr 1.2fr;
                gap: 20px;
            }
            .results-panel .panel-header {
                grid-column: 1 / span 2;
            }
            .loss-readout-box {
                grid-column: 1;
                grid-row: 2;
            }
            .results-grid {
                grid-column: 2;
                grid-row: 2;
            }
        }
        @container friction-container (max-width: 768px) {
            .app-main-grid {
                grid-template-columns: 1fr;
            }
            .control-panel, .simulation-panel, .results-panel {
                grid-column: 1;
            }
            .results-panel {
                display: flex;
                flex-direction: column;
                gap: 16px;
            }
            .loss-readout-box, .results-grid {
                grid-column: auto;
                grid-row: auto;
            }
            .panel-header h2 {
                white-space: normal !important;
                font-size: 15px !important;
            }
            .app-header {
                flex-direction: column;
                gap: 16px;
                text-align: center;
            }
            .logo-area {
                flex-direction: column;
                gap: 8px;
            }
        }
        .preset-details {
            display: flex;
            flex-direction: column;
            gap: 2px;
            align-items: flex-start;
            text-align: left;
        }
        .preset-spec {
            font-size: 11px;
            color: var(--color-text-muted);
            font-weight: 500;
        }
        .preset-name {
            font-size: 13px !important;
        }
/* ━━ WordPress 레이아웃 Override: 디자인 1 (2열 컴팩트 대칭 레이아웃) ━━ */
.pipe-friction-wrapper .app-main-grid,
.pipe-friction-wrapper .main-grid,
.pipe-friction-wrapper .sim-grid {
    display: grid !important;
    grid-template-columns: 340px 1fr !important;
    gap: 24px !important;
    align-items: start !important;
}
/* 3열 레이아웃을 2열 레이아웃으로 변경하는 특화 스타일 */
.pipe-friction-wrapper .right-column {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    min-width: 0 !important;
    grid-column: 2 !important;
}
.pipe-friction-wrapper .simulation-panel,
.pipe-friction-wrapper .canvas-panel,
.pipe-friction-wrapper .sim-panel {
    grid-column: auto !important;
    order: 1 !important;
    align-self: stretch !important;
}
.pipe-friction-wrapper .control-panel {
    grid-column: 1 !important;
}
/* 2열 통합 결과 분석 영역 레이아웃 */
.pipe-friction-wrapper .simulation-results-section {
    display: grid !important;
    grid-template-columns: 1.1fr 1.3fr !important;
    gap: 20px !important;
    border-top: 1px solid var(--color-border) !important;
    padding-top: 20px !important;
    margin-top: 10px !important;
    align-items: stretch !important;
}
/* Readout Box 스타일 */
.pipe-friction-wrapper .simulation-results-section .ratio-readout-box,
.pipe-friction-wrapper .simulation-results-section .re-readout-box,
.pipe-friction-wrapper .simulation-results-section .status-readout-box,
.pipe-friction-wrapper .simulation-results-section .flow-readout-box,
.pipe-friction-wrapper .simulation-results-section [class*="readout-box"],
.pipe-friction-wrapper .simulation-results-section .gauge-container {
    grid-column: 1 !important;
    grid-row: 1 !important;
    margin: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}
.pipe-friction-wrapper .simulation-results-section .results-grid {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    justify-content: flex-start !important;
}
.pipe-friction-wrapper .simulation-results-section .results-grid .result-card {
    flex: none !important;
    display: flex !important;
    align-items: center !important;
    min-height: 72px !important;
    height: auto !important;
    padding: 12px 16px !important;
}
.pipe-friction-wrapper .simulation-results-section .formula-card {
    grid-column: 1 / span 2 !important;
    grid-row: 2 !important;
}
/* 모바일/반응형 (800px 이하) ── 항상 세로형(1열) 정렬 및 시뮬레이터 캔버스 최상단 배치 */
@media (max-width: 800px) {
    .pipe-friction-wrapper .app-main-grid,
    .pipe-friction-wrapper .main-grid,
    .pipe-friction-wrapper .sim-grid {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .pipe-friction-wrapper .control-panel {
        order: 2 !important;
        width: 100% !important;
    }
    .pipe-friction-wrapper .right-column {
        order: 1 !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .pipe-friction-wrapper .simulation-panel,
    .pipe-friction-wrapper .canvas-panel,
    .pipe-friction-wrapper .sim-panel,
    .pipe-friction-wrapper .canvas-section {
        order: -1 !important;
    }
    .pipe-friction-wrapper .simulation-results-section {
        grid-template-columns: 1fr !important;
    }
    .pipe-friction-wrapper .simulation-results-section .ratio-readout-box,
    .pipe-friction-wrapper .simulation-results-section .re-readout-box,
    .pipe-friction-wrapper .simulation-results-section .status-readout-box,
    .pipe-friction-wrapper .simulation-results-section .flow-readout-box,
    .pipe-friction-wrapper .simulation-results-section [class*="readout-box"],
    .pipe-friction-wrapper .simulation-results-section .gauge-container {
        grid-column: 1 !important;
        grid-row: auto !important;
        height: auto !important;
    }
    .pipe-friction-wrapper .simulation-results-section .results-grid {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
    .pipe-friction-wrapper .simulation-results-section .formula-card {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
}
.pipe-friction-wrapper .app-container,
.pipe-friction-wrapper .main-container {
    max-width: 100% !important;
    padding: 12px !important;
}
/* Premium Advice/Formula Card & Typography Overrides */
.pipe-friction-wrapper .simulation-results-section .formula-card,
.pipe-friction-wrapper .results-panel .formula-card {
    background: #ffffff !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: var(--shadow-card) !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 8px !important;
}
.pipe-friction-wrapper .simulation-results-section .formula-card h4,
.pipe-friction-wrapper .results-panel .formula-card h4 {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--color-text-main) !important;
    margin-top: 0 !important;
    margin-bottom: 4px !important;
    word-break: keep-all !important;
    line-height: 1.4 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.pipe-friction-wrapper .formula-equation {
    font-family: 'Outfit', 'Cambria Math', 'Times New Roman', monospace !important;
    white-space: nowrap !important;
    overflow-x: auto !important;
    word-break: keep-all !important;
    text-align: center !important;
}
.pipe-friction-wrapper #text-judgment {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--color-text-muted) !important;
    line-height: 1.6 !important;
    word-break: keep-all !important;
}
</style>
<div class="pipe-friction-wrapper" style="position: relative; width: 100%; box-sizing: border-box; overflow: hidden; margin: 30px auto; border-radius: 20px;">
    <div class="app-background-glow" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: hidden;"></div>
    <div style="position: relative; z-index: 2; width: 100%;">
    <div class="app-container">
        <header class="app-header">
            <div class="logo-area">
                <div class="logo-icon"><i class="fa-solid fa-water"></i></div>
                <div>
                    <h1>PIPE FRICTION LOSS</h1>
                    <div class="subtitle">배관 마찰 압력 손실 계산기 (Haaland &#038; Darcy)</div>
                </div>
            </div>
            <div class="header-badge">
                <div class="pulse-dot"></div>
                <span class="badge-text">DARCY-WEISBACH</span>
            </div>
        </header>
        <div class="app-main-grid">
            <!-- Controls -->
            <div class="panel control-panel">
                <div class="panel-header text-cyan">
                    <i class="fa-solid fa-sliders"></i>
                    <h2>배관 스펙 및 유동 입력</h2>
                </div>
                <!-- D Diameter -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label for="input-d"><i class="fa-solid fa-circle-dot text-cyan"></i> 배관 내경 (D)</label>
                        <span class="helper-text">범위: 10 ~ 300 mm</span>
                    </div>
                    <div class="number-input-wrapper">
                        <input type="number" id="input-d" class="custom-number-input" min="10" max="300" value="80">
                        <span class="unit-badge">mm</span>
                    </div>
                    <input type="range" id="slider-d" class="custom-slider" min="10" max="300" value="80">
                </div>
                <!-- L Length -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label for="input-l"><i class="fa-solid fa-ruler-horizontal text-purple"></i> 배관 길이 (L)</label>
                        <span class="helper-text">범위: 10 ~ 1000 m</span>
                    </div>
                    <div class="number-input-wrapper">
                        <input type="number" id="input-l" class="custom-number-input" min="10" max="1000" value="100">
                        <span class="unit-badge">m</span>
                    </div>
                    <input type="range" id="slider-l" class="custom-slider" min="10" max="1000" value="100">
                </div>
                <!-- Q Flow Rate -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label for="input-q"><i class="fa-solid fa-gauge-high text-success"></i> 유동 유량 (Q)</label>
                        <span class="helper-text">범위: 0.5 ~ 500 m³/h</span>
                    </div>
                    <div class="number-input-wrapper">
                        <input type="number" id="input-q" class="custom-number-input" min="0.5" max="500" step="0.5" value="40.0">
                        <select id="select-q-unit" class="unit-select-badge">
                            <option value="m3h">m³/h</option>
                            <option value="LPM">LPM</option>
                            <option value="GPM">GPM</option>
                            <option value="m3s">m³/s</option>
                        </select>
                    </div>
                    <input type="range" id="slider-q" class="custom-slider" min="0.5" max="500" step="0.5" value="40">
                </div>
                <!-- ε Roughness -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label for="input-rough"><i class="fa-solid fa-barcode text-magenta"></i> 표면 절대 조도 (&epsilon;)</label>
                        <span class="helper-text">범위: 0.001 ~ 0.500 mm</span>
                    </div>
                    <div class="number-input-wrapper">
                        <input type="number" id="input-rough" class="custom-number-input" min="0.001" max="0.500" step="0.001" value="0.045">
                        <span class="unit-badge">mm</span>
                    </div>
                    <input type="range" id="slider-rough" class="custom-slider" min="1" max="500" value="45">
                </div>
                <!-- Presets -->
                <div class="presets-section">
                    <h3><i class="fa-solid fa-cubes"></i> 산업용 배관 재질 프리셋</h3>
                    <div class="presets-grid">
                        <button class="preset-btn" data-preset="pvc">
                            <div class="preset-icon"><i class="fa-solid fa-shield-halved"></i></div>
                            <div class="preset-details"><span class="preset-name">PVC 플라스틱 배관</span><span class="preset-spec">&epsilon; = 0.0015 mm</span></div>
                        </button>
                        <button class="preset-btn" data-preset="steel">
                            <div class="preset-icon"><i class="fa-solid fa-industry"></i></div>
                            <div class="preset-details"><span class="preset-name">일반 탄소강 강관</span><span class="preset-spec">&epsilon; = 0.045 mm</span></div>
                        </button>
                        <button class="preset-btn" data-preset="castiron">
                            <div class="preset-icon"><i class="fa-solid fa-square"></i></div>
                            <div class="preset-details"><span class="preset-name">거친 녹슨 주철관</span><span class="preset-spec">&epsilon; = 0.26 mm</span></div>
                        </button>
                    </div>
                </div>
            </div>
            <!-- Auto Injected Right Column wrapper for Design 1 -->
            <div class="right-column">
                <div class="panel simulation-panel">
                                <div class="panel-header text-purple">
                                    <div style="display: flex; align-items: center; gap: 12px;">
                                        <i class="fa-solid fa-display"></i>
                                        <h2>실시간 관내 유동 상태 &#038; 압력 감쇄 시각화</h2>
                                    </div>
                                    <div class="canvas-scale-indicator" id="txt-canvas-scale">조도 레벨: 탄소강 강관</div>
                                </div>
                                <div class="canvas-wrapper">
                                    <canvas id="physics-canvas" width="640" height="400"></canvas>
                                </div>
                                <div class="simulation-metrics-strip">
                                    <div class="mini-metric">
                                        <span class="label">Darcy 마찰계수 (f)</span>
                                        <span class="value" id="mini-f">0.0215</span>
                                    </div>
                                    <div class="mini-divider"></div>
                                    <div class="mini-metric">
                                        <span class="label">평균 유속 (v)</span>
                                        <span class="value" id="mini-v">2.21 m/s</span>
                                    </div>
                                    <div class="mini-divider"></div>
                                    <div class="mini-metric">
                                        <span class="label">레이놀즈수 (Re)</span>
                                        <span class="value" id="mini-re">176,800</span>
                                    </div>
                                </div>
                            <div class="simulation-results-section">
                                <div class="loss-readout-box">
                                    <span class="loss-title">TOTAL PRESSURE DROP (&Delta;P)</span>
                                    <span class="loss-value" id="txt-p-loss">0.69 bar</span>
                                    <span class="loss-type" id="txt-loss-m">수두 손실: 7.02 m</span>
                                </div>
                                <div class="results-grid">
                                    <div class="result-card">
                                        <div class="card-icon text-cyan"><i class="fa-solid fa-glass-water-droplet"></i></div>
                                        <div class="card-content">
                                            <span class="card-unit">유동 상태 판독 (Flow Regime)</span>
                                            <span class="card-value" id="txt-flow-status">완전 난류 (Turbulent)</span>
                                        </div>
                                    </div>
                                    <div class="result-card">
                                        <div class="card-icon text-purple"><i class="fa-solid fa-chart-line-up"></i></div>
                                        <div class="card-content">
                                            <span class="card-unit">100m 당 압력 하락폭</span>
                                            <span class="card-value" id="txt-p-loss-100m">0.69 bar / 100m</span>
                                        </div>
                                    </div>
                                </div>
                                <div class="formula-card">
                                        <h4><i class="fa-solid fa-circle-info text-cyan"></i> Haaland 마찰 보정 공식</h4>
                                        <div class="formula-equation">1/&radic;f &approx; -1.8log[(&epsilon;/3.7D)<sup>1.11</sup> + 6.9/Re]</div>
                                        <p>
                                            * 층류(Re&le;2300)에서는 f = 64/Re 식을 적용하며, 난류에서는 벽 거칠기를 가산합니다.
                                        </p>
                                    </div>
                            </div>
                </div>
            </div>
        </div>
        <!-- Disclaimer Footer -->
        <footer class="app-disclaimer" style="margin-top: 20px; padding: 12px 16px; background: rgba(0, 0, 0, 0.015); border: 1px solid var(--color-border); border-radius: 12px; font-size: 11px; color: var(--color-text-muted); line-height: 1.5; text-align: left; display: flex; gap: 10px; align-items: flex-start; clear: both;">
            <i class="fa-solid fa-circle-info" style="color: var(--color-cyan); font-size: 14px; margin-top: 2px; flex-shrink: 0;"></i>
            <span><strong>면책 조항 (Disclaimer):</strong> 본 시뮬레이터의 계산 결과는 교육 및 참고용으로만 제공되며, 실제 제품 설계나 제작 시에는 반드시 최신 공학 규격 및 공식 표준 설계 기준을 재확인하시기 바랍니다. 계산 값의 무결성을 보장하지 않으며, 이로 인해 발생하는 직접적/간접적 손해에 대해 제작자 및 본 블로그는 어떠한 책임을 지지 않습니다.</span>
        </footer>
</div>
    </div>
</div>
<script>
        (function() {
            // State
            const state = {
                d: 80,         // mm
                l: 100,        // m
                q: 40.0,       // m³/h (stored normalized in m3/h)
                qUnit: 'm3h',  // active input unit
                rough: 0.045,  // mm
                particles: [],
                splashes: [],
                lastTime: 0
            };
            // DOM Elements
            const inputD = document.getElementById('input-d');
            const sliderD = document.getElementById('slider-d');
            const inputL = document.getElementById('input-l');
            const sliderL = document.getElementById('slider-l');
            const inputQ = document.getElementById('input-q');
            const sliderQ = document.getElementById('slider-q');
            const selectQUnit = document.getElementById('select-q-unit');
            const inputRough = document.getElementById('input-rough');
            const sliderRough = document.getElementById('slider-rough');
            const txtPLoss = document.getElementById('txt-p-loss');
            const txtLossM = document.getElementById('txt-loss-m');
            const txtFlowStatus = document.getElementById('txt-flow-status');
            const txtPLoss100m = document.getElementById('txt-p-loss-100m');
            const miniF = document.getElementById('mini-f');
            const miniV = document.getElementById('mini-v');
            const miniRe = document.getElementById('mini-re');
            const presetButtons = document.querySelectorAll('.preset-btn');
            const canvas = document.getElementById('physics-canvas');
            const ctx = canvas.getContext('2d');
            // Initialize Particles
            const maxParticles = 90;
            for (let i = 0; i < maxParticles; i++) {
                state.particles.push({
                    x: 80 + Math.random() * 450,
                    yFrac: 0.15 + Math.random() * 0.7
                });
            }
            // Flow conversion helpers
            function convertQToUnit(valM3h, unit) {
                if (unit === 'm3h') return valM3h;
                if (unit === 'LPM') return valM3h * (1000 / 60);
                if (unit === 'GPM') return valM3h * (1000 / 60) * 0.264172;
                if (unit === 'm3s') return valM3h / 3600;
                return valM3h;
            }
            function convertQFromUnit(val, unit) {
                if (unit === 'm3h') return val;
                if (unit === 'LPM') return val / (1000 / 60);
                if (unit === 'GPM') return val / ((1000 / 60) * 0.264172);
                if (unit === 'm3s') return val * 3600;
                return val;
            }
            function updateQInputControls() {
                const unit = state.qUnit;
                let minVal, maxVal, stepVal;
                if (unit === 'm3h') {
                    minVal = 0.5; maxVal = 500; stepVal = 0.5;
                } else if (unit === 'LPM') {
                    minVal = 10; maxVal = 8000; stepVal = 10;
                } else if (unit === 'GPM') {
                    minVal = 3; maxVal = 2200; stepVal = 5;
                } else if (unit === 'm3s') {
                    minVal = 0.0001; maxVal = 0.1400; stepVal = 0.0001;
                }
                // Update number input attributes
                inputQ.min = minVal;
                inputQ.max = maxVal;
                inputQ.step = stepVal;
                // Update slider attributes
                sliderQ.min = minVal;
                sliderQ.max = maxVal;
                sliderQ.step = stepVal;
                // Update helper text range display
                const parentGroup = inputQ.closest('.input-group');
                if (parentGroup) {
                    const helper = parentGroup.querySelector('.helper-text');
                    if (helper) {
                        const unitSymbol = unit === 'm3h' ? 'm³/h' : (unit === 'm3s' ? 'm³/s' : unit);
                        helper.innerText = `범위: ${minVal} ~ ${maxVal} ${unitSymbol}`;
                    }
                }
            }
            // Sync
            function syncDFromSlider() {
                state.d = parseInt(sliderD.value);
                inputD.value = state.d;
                clearPresets();
                updateCalculations();
            }
            function syncDFromInput() {
                let val = parseInt(inputD.value);
                if (isNaN(val)) { val = 80; }
                if (val < 10) { val = 10; }
                if (val > 300) { val = 300; }
                state.d = val;
                inputD.value = val;
                sliderD.value = val;
                clearPresets();
                updateCalculations();
            }
            function syncLFromSlider() {
                state.l = parseInt(sliderL.value);
                inputL.value = state.l;
                clearPresets();
                updateCalculations();
            }
            function syncLFromInput() {
                let val = parseInt(inputL.value);
                if (isNaN(val)) { val = 100; }
                if (val < 10) { val = 10; }
                if (val > 1000) { val = 1000; }
                state.l = val;
                inputL.value = val;
                sliderL.value = val;
                clearPresets();
                updateCalculations();
            }
            function syncQFromSlider() {
                const val = parseFloat(sliderQ.value);
                inputQ.value = state.qUnit === 'm3s' ? val.toFixed(4) : (state.qUnit === 'm3h' ? val.toFixed(1) : val.toFixed(0));
                state.q = convertQFromUnit(val, state.qUnit);
                clearPresets();
                updateCalculations();
            }
            function syncQFromInput() {
                let val = parseFloat(inputQ.value);
                const minVal = parseFloat(inputQ.min);
                const maxVal = parseFloat(inputQ.max);
                if (isNaN(val)) { val = convertQToUnit(40.0, state.qUnit); }
                if (val < minVal) { val = minVal; }
                if (val > maxVal) { val = maxVal; }
                inputQ.value = state.qUnit === 'm3s' ? val.toFixed(4) : (state.qUnit === 'm3h' ? val.toFixed(1) : val.toFixed(0));
                sliderQ.value = val;
                state.q = convertQFromUnit(val, state.qUnit);
                clearPresets();
                updateCalculations();
            }
            function syncRoughFromSlider() {
                state.rough = parseFloat(sliderRough.value) / 1000;
                inputRough.value = state.rough.toFixed(3);
                clearPresets();
                updateCalculations();
            }
            function syncRoughFromInput() {
                let val = parseFloat(inputRough.value);
                if (isNaN(val)) { val = 0.045; }
                if (val < 0.001) { val = 0.001; }
                if (val > 0.500) { val = 0.500; }
                state.rough = val;
                inputRough.value = val.toFixed(3);
                sliderRough.value = Math.round(val * 1000);
                clearPresets();
                updateCalculations();
            }
            sliderD.addEventListener('input', syncDFromSlider);
            inputD.addEventListener('change', syncDFromInput);
            sliderL.addEventListener('input', syncLFromSlider);
            inputL.addEventListener('change', syncLFromInput);
            sliderQ.addEventListener('input', syncQFromSlider);
            inputQ.addEventListener('change', syncQFromInput);
            sliderRough.addEventListener('input', syncRoughFromSlider);
            inputRough.addEventListener('change', syncRoughFromInput);
            selectQUnit.addEventListener('change', function() {
                const oldUnit = state.qUnit;
                const newUnit = selectQUnit.value;
                state.qUnit = newUnit;
                const oldValInActiveUnit = convertQToUnit(state.q, oldUnit);
                const newValInActiveUnit = convertQToUnit(state.q, newUnit);
                updateQInputControls();
                inputQ.value = newUnit === 'm3s' ? newValInActiveUnit.toFixed(4) : (newUnit === 'm3h' ? newValInActiveUnit.toFixed(1) : newValInActiveUnit.toFixed(0));
                sliderQ.value = newValInActiveUnit;
                updateCalculations();
            });
            // Presets
            function loadPreset(presetKey) {
                clearPresets();
                presetButtons.forEach(function(btn) {
                    if (btn.dataset.preset === presetKey) {
                        btn.classList.add('active');
                    }
                });
                if (presetKey === 'pvc') {
                    state.d = 100;
                    state.l = 100;
                    state.q = 50.0;
                    state.rough = 0.0015;
                } else if (presetKey === 'steel') {
                    state.d = 80;
                    state.l = 100;
                    state.q = 40.0;
                    state.rough = 0.045;
                } else if (presetKey === 'castiron') {
                    state.d = 80;
                    state.l = 100;
                    state.q = 35.0;
                    state.rough = 0.26;
                }
                inputD.value = state.d;
                sliderD.value = state.d;
                inputL.value = state.l;
                sliderL.value = state.l;
                const qInActiveUnit = convertQToUnit(state.q, state.qUnit);
                inputQ.value = state.qUnit === 'm3s' ? qInActiveUnit.toFixed(4) : (state.qUnit === 'm3h' ? qInActiveUnit.toFixed(1) : qInActiveUnit.toFixed(0));
                sliderQ.value = qInActiveUnit;
                inputRough.value = state.rough.toFixed(4);
                sliderRough.value = Math.round(state.rough * 1000);
                updateCalculations();
            }
            function clearPresets() {
                presetButtons.forEach(function(btn) {
                    btn.classList.remove('active');
                });
            }
            presetButtons.forEach(function(btn) {
                btn.addEventListener('click', function() {
                    loadPreset(btn.dataset.preset);
                });
            });
            // Darcy Weisbach and Haaland solver
            function updateCalculations() {
                const g = 9.80665;
                const nu = 1.006e-6; // Kinematic viscosity of water at 20C
                const rho = 998.2;   // Density of water at 20C
                // Diameter m
                const D_m = state.d / 1000;
                const area = (Math.PI * Math.pow(D_m, 2)) / 4;
                // Velocity
                const v = state.q / (3600 * area);
                miniV.innerText = v.toFixed(2) + ' m/s';
                // Reynolds
                const re = (v * D_m) / nu;
                miniRe.innerText = Math.round(re).toLocaleString();
                let flowRegime = '완전 난류 (Turbulent)';
                if (re <= 2300) {
                    flowRegime = '안정적 층류 (Laminar)';
                } else if (re <= 4000) {
                    flowRegime = '천이 영역 (Transition)';
                }
                txtFlowStatus.innerText = flowRegime;
                // Friction factor f
                let f = 0.02;
                if (re <= 2300) {
                    // Laminar flow
                    if (re > 0) {
                        f = 64 / re;
                    } else {
                        f = 0;
                    }
                } else {
                    // Haaland approximation
                    const roughRatio = (state.rough / 1000) / D_m;
                    const logTerm = Math.log10(Math.pow(roughRatio / 3.7, 1.11) + 6.9 / re);
                    if (logTerm < 0) {
                        f = Math.pow(1 / (-1.8 * logTerm), 2);
                    }
                }
                miniF.innerText = f.toFixed(4);
                // Head loss h_f = f * (L/D) * (v^2 / 2g)
                const hf = f * (state.l / D_m) * (Math.pow(v, 2) / (2 * g));
                txtLossM.innerText = '수두 마찰 손실: ' + hf.toFixed(2) + ' m';
                // Pressure drop = rho * g * h_f / 100000 (bar)
                const deltaP = (rho * g * hf) / 100000;
                txtPLoss.innerText = deltaP.toFixed(2) + ' bar';
                // Loss per 100m
                const deltaP100m = (deltaP / state.l) * 100;
                txtPLoss100m.innerText = deltaP100m.toFixed(2) + ' bar / 100m';
                const txtCanvasScale = document.getElementById('txt-canvas-scale');
                if (txtCanvasScale) {
                    let textBadge = '탄소강 배관 사양';
                    if (state.rough <= 0.002) {
                        textBadge = 'PVC 매끄러운 배관';
                    } else if (state.rough >= 0.2) {
                        textBadge = '거친 주철 배관';
                    }
                    txtCanvasScale.innerText = `벽면 성격: ${textBadge}`;
                }
            }
            // Draw pipe flow with roughness and dynamic zooming
            function draw(currentTime) {
                requestAnimationFrame(draw);
                let dt = (currentTime - state.lastTime) / 1000;
                if (isNaN(dt)) { dt = 0.016; }
                if (dt < 0) { dt = 0.016; }
                if (dt > 0.1) { dt = 0.016; }
                state.lastTime = currentTime;
                const width = canvas.width;
                const height = canvas.height;
                ctx.clearRect(0, 0, width, height);
                // Grid (fixed background grid)
                ctx.save();
                ctx.strokeStyle = 'rgba(2, 132, 199, 0.04)';
                ctx.lineWidth = 1;
                for (let x = 0; x < width; x += 30) {
                    ctx.beginPath();
                    ctx.moveTo(x, 0);
                    ctx.lineTo(x, height);
                    ctx.stroke();
                }
                for (let y = 0; y < height; y += 30) {
                    ctx.beginPath();
                    ctx.moveTo(0, y);
                    ctx.lineTo(width, y);
                    ctx.stroke();
                }
                ctx.restore();
                // Dynamic Zoom computation (zooms in on short lengths, zooms out on long lengths)
                const zoom = 0.85 + 0.55 * Math.pow((1000 - state.l) / 990, 1.5);
                // Pipe geometry (visual pipe height scales with inner diameter d &#038; zoom)
                const basePipeHeight = 30 + ((state.d - 10) / 290) * 130;
                const pipeHeight = basePipeHeight * zoom;
                const cy = height / 2 + 10; // offset downwards to leave space for gauge
                const pipeTop = cy - pipeHeight / 2;
                const pipeBottom = cy + pipeHeight / 2;
                // Pipe visual boundaries with right-shifted pipeLeft to fit pump
                const pipeLeft = 80;
                const pipeRight = 240 + ((state.l - 10) / 990) * (width - 340);
                // Physical parameters for flow
                const D_m = state.d / 1000;
                const area = (Math.PI * Math.pow(D_m, 2)) / 4;
                const v = state.q / (3600 * area);
                const g = 9.80665;
                const nu = 1.006e-6;
                const rho = 998.2;
                const re = (v * D_m) / nu;
                let f = 0.02;
                if (re <= 2300) {
                    if (re > 0) { f = 64 / re; }
                } else {
                    const roughRatio = (state.rough / 1000) / D_m;
                    const logTerm = Math.log10(Math.pow(roughRatio / 3.7, 1.11) + 6.9 / re);
                    if (logTerm < 0) { f = Math.pow(1 / (-1.8 * logTerm), 2); }
                }
                const hf = f * (state.l / D_m) * (Math.pow(v, 2) / (2 * g));
                const deltaP = (rho * g * hf) / 100000; // bar
                const lossIntensity = Math.min(hf / 15, 1.0); // clamped visual limit
                // 1. Draw Centrifugal Pump on the left
                ctx.save();
                ctx.fillStyle = '#475569';
                ctx.strokeStyle = '#334155';
                ctx.lineWidth = 2 * zoom;
                const px = pipeLeft - 25 * zoom;
                const py = cy;
                const pr = 15 * zoom;
                // Pump suction inlet pipe (from far left)
                ctx.fillStyle = '#64748b';
                ctx.fillRect(0, py - 6 * zoom, px - pr, 12 * zoom);
                ctx.strokeRect(0, py - 6 * zoom, px - pr, 12 * zoom);
                // Discharge transition block (tangential outlet pipe)
                ctx.fillStyle = '#475569';
                ctx.fillRect(px, py - pipeHeight / 2, pipeLeft - 8 * zoom - px, pipeHeight);
                ctx.strokeRect(px, py - pipeHeight / 2, pipeLeft - 8 * zoom - px, pipeHeight);
                // Pump housing (scroll casing)
                ctx.fillStyle = '#475569';
                ctx.beginPath();
                ctx.arc(px, py, pr, 0, Math.PI * 2);
                ctx.fill();
                ctx.stroke();
                // Centrifugal impeller cover ring
                ctx.strokeStyle = '#cbd5e1';
                ctx.lineWidth = 1.5 * zoom;
                ctx.beginPath();
                ctx.arc(px, py, pr * 0.7, 0, Math.PI * 2);
                ctx.stroke();
                // Impeller central shaft cap
                ctx.fillStyle = '#1e293b';
                ctx.beginPath();
                ctx.arc(px, py, pr * 0.3, 0, Math.PI * 2);
                ctx.fill();
                ctx.stroke();
                ctx.restore();
                // 2. Draw interior pressure gradient shift (High pressure Cyan on left -> Low pressure Magenta on right)
                ctx.save();
                const interiorGrad = ctx.createLinearGradient(pipeLeft, pipeTop, pipeRight, pipeTop);
                interiorGrad.addColorStop(0, 'rgba(2, 132, 199, 0.25)');
                interiorGrad.addColorStop(1, 'rgba(219, 39, 119, ' + (0.1 + lossIntensity * 0.5) + ')');
                ctx.fillStyle = interiorGrad;
                ctx.fillRect(pipeLeft, pipeTop, pipeRight - pipeLeft, pipeHeight);
                ctx.restore();
                // 3. Draw wall roughness elements
                ctx.save();
                ctx.fillStyle = '#64748b';
                ctx.strokeStyle = '#475569';
                ctx.lineWidth = 4 * zoom;
                // Top Pipe Wall
                ctx.beginPath();
                ctx.moveTo(pipeLeft, pipeTop);
                ctx.lineTo(pipeRight, pipeTop);
                ctx.stroke();
                // Bottom Pipe Wall
                ctx.beginPath();
                ctx.moveTo(pipeLeft, pipeBottom);
                ctx.lineTo(pipeRight, pipeBottom);
                ctx.stroke();
                // If roughness is high, draw jagged texture on boundaries
                if (state.rough > 0.01) {
                    const bumpSize = Math.max(state.rough * 30, 2.5) * zoom; // scale bump height visually
                    const bumpFreq = Math.max(30 - state.rough * 30, 8) * zoom; // frequency of bumps
                    ctx.fillStyle = 'rgba(71, 85, 105, 0.8)';
                    for (let wx = pipeLeft + 5; wx < pipeRight - 5; wx += bumpFreq) {
                        // Top wall bumps
                        ctx.beginPath();
                        ctx.moveTo(wx, pipeTop);
                        ctx.lineTo(wx + bumpFreq/2, pipeTop + bumpSize);
                        ctx.lineTo(wx + bumpFreq, pipeTop);
                        ctx.closePath();
                        ctx.fill();
                        // Bottom wall bumps
                        ctx.beginPath();
                        ctx.moveTo(wx, pipeBottom);
                        ctx.lineTo(wx + bumpFreq/2, pipeBottom - bumpSize);
                        ctx.lineTo(wx + bumpFreq, pipeBottom);
                        ctx.closePath();
                        ctx.fill();
                    }
                }
                ctx.restore();
                // Draw Inlet Flange &#038; Outlet Flange
                ctx.save();
                ctx.fillStyle = '#64748b';
                ctx.strokeStyle = '#475569';
                ctx.lineWidth = 1.5 * zoom;
                // Left/Inlet Flange
                ctx.beginPath();
                ctx.rect(pipeLeft - 8 * zoom, pipeTop - 6 * zoom, 8 * zoom, pipeHeight + 12 * zoom);
                ctx.fill();
                ctx.stroke();
                // Right/Outlet Flange
                ctx.beginPath();
                ctx.rect(pipeRight, pipeTop - 6 * zoom, 8 * zoom, pipeHeight + 12 * zoom);
                ctx.fill();
                ctx.stroke();
                ctx.restore();
                // 4. Draw water jet discharging from outlet
                ctx.save();
                const streamGrad = ctx.createLinearGradient(pipeRight, pipeTop, pipeRight + 45 * zoom, cy + 80 * zoom);
                streamGrad.addColorStop(0, 'rgba(' + Math.floor(2 + lossIntensity * 217) + ', ' + Math.floor(132 - lossIntensity * 93) + ', ' + Math.floor(199 + lossIntensity * 56) + ', 0.6)');
                streamGrad.addColorStop(1, 'rgba(219, 39, 119, 0.05)');
                ctx.fillStyle = streamGrad;
                ctx.beginPath();
                ctx.moveTo(pipeRight + 8 * zoom, pipeTop);
                ctx.bezierCurveTo(pipeRight + 30 * zoom, pipeTop, pipeRight + 42 * zoom, cy + 50 * zoom, pipeRight + 42 * zoom, cy + 80 * zoom);
                ctx.lineTo(pipeRight + 26 * zoom, cy + 80 * zoom);
                ctx.bezierCurveTo(pipeRight + 26 * zoom, cy + 50 * zoom, pipeRight + 16 * zoom, pipeBottom, pipeRight + 8 * zoom, pipeBottom);
                ctx.closePath();
                ctx.fill();
                ctx.restore();
                // Spawning splashes at jet impact area
                if (Math.random() > 0.4) {
                    state.splashes.push({
                        x: pipeRight + 34 * zoom,
                        y: cy + 80 * zoom,
                        vx: (Math.random() - 0.2) * 50 * Math.max(0.5, v/3),
                        vy: -(0.5 + Math.random() * 0.8) * 45 * Math.max(0.5, v/3),
                        life: 1.0,
                        decay: 0.06 + Math.random() * 0.08,
                        size: 1 + Math.random() * 2
                     });
                }
                // Animate splashes
                ctx.save();
                ctx.fillStyle = 'rgba(2, 132, 199, 0.6)';
                state.splashes = state.splashes.filter(function(s) { return s.life > 0; });
                state.splashes.forEach(function(s) {
                    s.x += s.vx * dt;
                    s.y += s.vy * dt;
                    s.vy += 9.8 * 8 * dt; // gravity visual scale
                    s.life -= s.decay;
                    ctx.beginPath();
                    ctx.arc(s.x, s.y, s.size * zoom, 0, Math.PI * 2);
                    ctx.fill();
                });
                ctx.restore();
                // 5. Draw particles flowing inside pipe
                ctx.save();
                state.particles.forEach(function(p) {
                    const moveSpeed = v * 80;
                    let wobble = 0;
                    if (re > 4000) {
                        wobble = (Math.random() - 0.5) * (re / 150000) * 2;
                    }
                    p.x += moveSpeed * dt;
                    if (p.x > pipeRight - 5) {
                        p.x = pipeLeft + 5;
                        p.yFrac = 0.15 + Math.random() * 0.7;
                    }
                    const yCoord = pipeTop + p.yFrac * pipeHeight + wobble * zoom;
                    const progress = (p.x - pipeLeft) / (pipeRight - pipeLeft);
                    ctx.fillStyle = 'rgba(' + Math.floor(2 + progress * 217) + ', ' + Math.floor(132 - progress * 93) + ', ' + Math.floor(199 + progress * 56) + ', 0.7)';
                    ctx.beginPath();
                    ctx.arc(p.x, yCoord, 3 * zoom, 0, Math.PI * 2);
                    ctx.fill();
                });
                ctx.restore();
                // 6. Draw Inlet Pressure Gauge Dial
                ctx.save();
                const gx = pipeLeft + 25 * zoom;
                const gy = pipeTop - 35 * zoom;
                const gr = 20 * zoom;
                ctx.fillStyle = '#f8fafc';
                ctx.strokeStyle = '#64748b';
                ctx.lineWidth = 2.5 * zoom;
                ctx.beginPath();
                ctx.arc(gx, gy, gr, 0, Math.PI * 2);
                ctx.fill();
                ctx.stroke();
                ctx.strokeStyle = 'rgba(2, 132, 199, 0.15)';
                ctx.lineWidth = 1.5 * zoom;
                ctx.beginPath();
                ctx.arc(gx, gy, gr - 4 * zoom, 0, Math.PI * 2);
                ctx.stroke();
                const maxPScale = Math.max(2.0, Math.ceil(deltaP * 1.2));
                ctx.strokeStyle = '#94a3b8';
                ctx.lineWidth = 1 * zoom;
                for (let a = -Math.PI * 0.75; a <= Math.PI * 0.75; a += Math.PI * 0.375) {
                    ctx.beginPath();
                    ctx.moveTo(gx + Math.cos(a) * (gr - 4 * zoom), gy + Math.sin(a) * (gr - 4 * zoom));
                    ctx.lineTo(gx + Math.cos(a) * gr, gy + Math.sin(a) * gr);
                    ctx.stroke();
                }
                const needleAngle = -Math.PI * 0.75 + Math.min(1.0, deltaP / maxPScale) * Math.PI * 1.5;
                ctx.strokeStyle = '#db2777';
                ctx.lineWidth = 1.5 * zoom;
                ctx.beginPath();
                ctx.moveTo(gx, gy);
                ctx.lineTo(gx + Math.cos(needleAngle) * (gr - 3 * zoom), gy + Math.sin(needleAngle) * (gr - 3 * zoom));
                ctx.stroke();
                ctx.fillStyle = '#475569';
                ctx.beginPath();
                ctx.arc(gx, gy, 2 * zoom, 0, Math.PI * 2);
                ctx.fill();
                ctx.fillStyle = '#475569';
                ctx.font = '700 ' + Math.max(11, 8.5 * zoom) + 'px Inter, sans-serif';
                ctx.textAlign = 'center';
                ctx.fillText(deltaP.toFixed(2) + ' bar', gx, gy + gr + Math.max(9, 11 * zoom));
                ctx.font = '500 ' + Math.max(10, 7 * zoom) + 'px Inter, sans-serif';
                ctx.fillStyle = '#94a3b8';
                ctx.fillText('입구 압력', gx, gy - gr - Math.max(4, 4 * zoom));
                ctx.restore();
                // 7. CAD Style Dimension Line for Pipe Length (L)
                ctx.save();
                ctx.strokeStyle = '#7c3aed';
                ctx.fillStyle = '#7c3aed';
                ctx.lineWidth = 1.0;
                ctx.font = '500 ' + Math.max(12, 9 * zoom) + 'px Inter, sans-serif';
                const dimY = pipeBottom + 25 * zoom;
                ctx.beginPath();
                ctx.moveTo(pipeLeft, dimY - 4 * zoom);
                ctx.lineTo(pipeLeft, dimY + 4 * zoom);
                ctx.stroke();
                ctx.beginPath();
                ctx.moveTo(pipeRight, dimY - 4 * zoom);
                ctx.lineTo(pipeRight, dimY + 4 * zoom);
                ctx.stroke();
                ctx.beginPath();
                ctx.moveTo(pipeLeft, dimY);
                ctx.lineTo(pipeRight, dimY);
                ctx.stroke();
                ctx.beginPath();
                ctx.moveTo(pipeLeft, dimY);
                ctx.lineTo(pipeLeft + 6 * zoom, dimY - 3 * zoom);
                ctx.lineTo(pipeLeft + 6 * zoom, dimY + 3 * zoom);
                ctx.closePath();
                ctx.fill();
                ctx.beginPath();
                ctx.moveTo(pipeRight, dimY);
                ctx.lineTo(pipeRight - 6 * zoom, dimY - 3 * zoom);
                ctx.lineTo(pipeRight - 6 * zoom, dimY + 3 * zoom);
                ctx.closePath();
                ctx.fill();
                ctx.textAlign = 'center';
                ctx.fillStyle = '#7c3aed';
                ctx.fillText('L = ' + state.l + ' m', (pipeLeft + pipeRight) / 2, dimY - Math.max(6, 6 * zoom));
                ctx.restore();
            }
            // Copy &#038; right click block with nested if
            document.addEventListener('contextmenu', function(e) {
                e.preventDefault();
                alert("이 콘텐츠는 저작권법의 보호를 받습니다. 무단 복제 및 우클릭을 금지합니다.");
                return false;
            }, { capture: true });
            document.addEventListener('selectstart', function(e) {
                e.preventDefault();
                return false;
            }, { capture: true });
            document.addEventListener('keydown', function(e) {
                if (e.key === 'F12') {
                    e.preventDefault();
                    alert("이 콘텐츠는 저작권법의 보호를 받습니다. 무단 복제 및 우클릭을 금지합니다.");
                    return false;
                }
                if (e.ctrlKey) {
                    if (e.key === 'u' || e.key === 'c' || e.key === 's' || e.key === 'U' || e.key === 'C' || e.key === 'S') {
                        e.preventDefault();
                        alert("이 콘텐츠는 저작권법의 보호를 받습니다. 무단 복제 및 우클릭을 금지합니다.");
                        return false;
                    }
                    if (e.shiftKey) {
                        if (['i','I','j','J','c','C'].includes(e.key)) {
                            e.preventDefault();
                            alert("이 콘텐츠는 저작권법의 보호를 받습니다. 무단 복제 및 우클릭을 금지합니다.");
                            return false;
                        }
                    }
                }
            }, { capture: true });
            // Initialize
            updateQInputControls();
            loadPreset('steel');
            requestAnimationFrame(draw);
        })();
</script>


<div style="background: linear-gradient(135deg, rgba(0,242,254,0.03), rgba(138,43,226,0.03)); border: 1px solid rgba(0,242,254,0.15); border-radius: 12px; padding: 18px 24px; margin: 25px auto 35px auto; font-size: 0.95em; color: #4b5563; line-height: 1.7; font-family: sans-serif;">
    <strong style="color: #1f2937; font-size: 1.05em; display: flex; align-items: center; gap: 8px;">
        <span style="font-size: 1.2em;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span> 간편 사용 설명서
    </strong>
    <ol style="margin: 10px 0 0 0; padding-left: 20px;">
        <li style="margin-bottom: 6px;"><strong>배관 지형 설정: 배관의 순내경(D, mm)과 실제 직선 배관 구간 길이(L, m)를 조절합니다.</strong></li>
<li style="margin-bottom: 6px;">설계 유량 입력: 이송할 액체의 체적 유량(m³/h)을 설정하여 관 내 속도 수두를 형성합니다.</li>
<li style="margin-bottom: 6px;">관 재질 조도(Roughness) 설정: PVC(0.0015mm), 탄소강 강관(0.045mm), 주철관(0.25mm) 등 배관 내부 벽면 거칠기(조도)를 세팅합니다.</li>
<li style="margin-bottom: 6px;">마찰 계수 및 손실 평가: 계측 보드에서 레이놀즈수에 따른 층류/난류 영역 판정, Darcy 마찰계수(f) 및 수두 마찰 손실(h_f, m)과 마찰 압력 하락폭(bar)을 실시간 모니터링합니다.</li>
    </ol>
</div>


<details class="premium-seo-accordion" style="border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; background: #fbfbfc; padding: 0; margin: 30px auto; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.01); font-family: sans-serif;">
    <summary style="display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; font-size: 1.1em; font-weight: 700; color: #1f2937; cursor: pointer; user-select: none; outline: none; list-style: none;">
        <span><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4da.png" alt="📚" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Darcy-Weisbach 방정식 및 Haaland 마찰 계수 공학 공식 해설</span>
        <span class="accordion-arrow" style="font-size: 0.9em; color: #9ca3af; transition: transform 0.2s ease;">▼</span>
    </summary>
    <div style="padding: 0 24px 24px 24px; border-top: 1px solid rgba(0,0,0,0.04); background: #ffffff; border-radius: 0 0 12px 12px; font-size: 0.98em; color: #374151; line-height: 1.8;">
        <div style="margin-top: 20px;">
            <h3>1. 달시-바이스바하(Darcy-Weisbach) 수두 마찰 손실 기본 공식</h3>
<p>유체가 충만하게 흐르는 배관 내부에서 벽면 점성 마찰에 의해 발생하는 마찰 수두 손실(Head Loss, <code>h_f</code>)은 배관 유속의 제곱에 비례하고 배관 구경에 반비례하며, 다음과 같은 물리 정립 공식인 <strong>달시-바이스바하(Darcy-Weisbach) 방정식</strong>을 따릅니다.</p><p style="text-align: center; font-weight: bold; background: #e0f2fe; padding: 16px; border-radius: 8px; font-size: 1.05em; color: #0369a1;">h_f = f &times; (L / D) &times; (v&sup2; / 2g)</p><p>여기서 <code>h_f</code>는 마찰 손실 수두(m), <code>f</code>는 Darcy 마찰계수(Dimensionless Friction Factor), <code>L</code>은 배관 총길이(m), <code>D</code>는 배관 내부 직경(m), <code>v</code>는 평균 유속(m/s), <code>g</code>는 중력가속도(9.80665 m/s²)입니다. 이를 펌프 운전압 기준인 압력 강하 단위(<code>&Delta;P</code>)로 변환할 경우 다음 공식이 적용됩니다.</p><p style="text-align: center; font-weight: bold; background: #f3f4f6; padding: 12px; border-radius: 8px;">&Delta;P = &rho; &times; g &times; h_f / 100,000 &nbsp;[bar]</p>
<h3>2. Darcy 마찰계수(f)의 층류/난류 판정 및 Haaland / Colebrook 공식</h3>
<p>마찰 계수 <code>f</code>의 결정은 유체 유동이 <strong>층류(Laminar Flow)</strong> 상태인지 <strong>난류(Turbulent Flow)</strong> 상태인지에 따라 달라집니다. 유동 영역은 무차원 수인 <strong>레이놀즈수(Reynolds Number, Re = vD/&nu;)</strong>를 기준으로 판단합니다.</p><ul><li><strong>층류 유동 (Re &le; 2300):</strong> 관 벽면 조도의 영향을 받지 않고 오직 점성력에 의해서만 저항이 발생하며 다음 선형 공식으로 단순 수렴합니다.<br><code style="background:#f1f5f9; padding:2px 6px; border-radius:4px;">f = 64 / Re</code></li><li><strong>난류 유동 (Re &gt; 4000):</strong> 관 벽 거칠기인 절대조도(<code>&epsilon;</code>)와 관 내경의 상대비율(<code>&epsilon;/D</code>) 및 레이놀즈수의 복합 난해 함수가 됩니다. 실무에서는 명시적 양해함수 근사식인 <strong>Haaland 공식</strong>을 사용하여 Colebrook-White 음해공식을 높은 오차 정밀도로 대체합니다.</li></ul><p style="text-align: center; font-weight: bold; background: #f3f4f6; padding: 16px; border-radius: 8px;">1/&radic;f &approx; -1.8 &times; log₁₀ [ (&epsilon;/3.7D)<sup>1.11</sup> + 6.9/Re ]</p>
<h3>3. 산업 배관 재질에 따른 대표 조도(Roughness) 가이드라인</h3>
<p>대표 조도란 배관 내벽의 미세 돌기들의 평균 높이를 뜻하며, 재질별로 마찰 계수 격차를 발생시키는 핵심 척도입니다.</p><ul><li><strong>PVC / 플라스틱 파이프:</strong> <code>0.0015 mm</code> (극도로 매끄러워 마찰 저항이 가장 낮음)</li><li><strong>신품 탄소강 강관 (Commercial Steel):</strong> <code>0.045 mm</code> (산업 플랜트 가공 기본 표준 강관)</li><li><strong>아연도금철관 (Galvanized Iron):</strong> <code>0.15 mm</code> (도금 피막 거칠기 영향으로 강관보다 거침)</li><li><strong>주철관 (Cast Iron):</strong> <code>0.26 mm</code> (주조 공정상 벽면 돌기가 가장 크며 스케일 퇴적 우려가 높음)</li></ul>
        </div>
    </div>
</details>
<style>
details.premium-seo-accordion[open] summary .accordion-arrow { transform: rotate(180deg); color: #00f2fe; }
details.premium-seo-accordion summary::-webkit-details-marker { display: none; }
details.premium-seo-accordion:hover { border-color: rgba(0,242,254,0.3); }
</style>

]]></content:encoded>
					
					<wfw:commentRss>https://myengnote.com/pipe-friction-pressure-drop-darcy-weisbach/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
