=========================================================
      MEMO Groundwater Network Design Plugin (v1.2)      
      MEMO 地下水監測井網設計套件 - 參數與操作手冊     
=========================================================

Part I: 中文版 (Chinese Version)
=========================================================

【套件簡介】
本套件基於 Domenico (1987) 傳輸解析解模型 (Analytical Transport Model) 開發，專為環境工程與水文地質專業人員設計。v1.2 版提供三大核心分析模式，全面支援地下水污染調查、擴散預測與不確定性風險評估。

---------------------------------------------------------
【一、 三大運算模式介紹】
---------------------------------------------------------

1. MEMO (井網盲區評估 / Well Network Blind Spot Evaluation)
- 目的：評估現有或規劃中之監測井網，能否有效攔截特定範圍內的潛在污染外洩。
- 運算邏輯：確定性模型 (Deterministic Model)。掃描廠區多邊形 (Polygon)，標示出會成為監測漏洞的「盲區範圍」。
- 輸入圖層：污染源區多邊形 (Source Area Polygon), 監測井點位 (Well Points)。

2. PLUME (污染團擴散 / Plume Dispersion Simulation)
- 目的：預測特定洩漏點位在經過特定時間後，污染物隨地下水傳輸的絕對濃度分佈與擴散範圍。
- 運算邏輯：動態向外展開演算法 (Dynamic Outward Expansion)。自動繪製無邊界限制的高解析度濃度漸層熱區 (Heatmap) 與多邊形 (Polygon)。
- 輸入圖層：污染源位置點位 (Source Location Point)。

3. COPRO (機率風險 / Probabilistic Risk Assessment)
- 目的：評估在自然水文參數（流速、流向）具備季節性或測量不確定性時，井網漏接污染的風險機率。
- 運算邏輯：蒙地卡羅模擬 (Monte Carlo Simulation)。自動抽樣數百種水文情境，產出 5 個風險等級的綜合盲區圖。
- 輸入圖層：污染源區多邊形 (Source Area Polygon), 監測井點位 (Well Points)。

---------------------------------------------------------
【二、 參數設定指南】
---------------------------------------------------------

[空間與幾何 / Spatial & Geometry]
* 網格間距 (Grid Size): 掃描解析度（預設 25m）。數值越小，熱區圖越細緻，但運算時間會呈指數增加。
* 地下水流向角度 (Flow Angle): 污染傳輸的絕對主軸（0°為正東，90°為正北）。
* 流向變異範圍 (Angle Variance) [僅 COPRO 模式]: 模擬流向的不確定性（如 ±15° 代表季節性水流偏移）。

[水文地質 / Hydrogeology]
* 縱向/橫向擴散係數 (L_disp / T_disp): 污染物沿水流主軸與垂直主軸的延散能力，通常與傳輸距離尺度有關。
* 平均流速 (Average Velocity): 地下水實際流速 (v = K*i/ne)。
* 流速變異範圍 (Vel. Variance) [僅 COPRO 模式]: 模擬流速測量誤差或地質非均質性導致的流速波動。
* 分子擴散係數 (Molecular Diffusion, D*): 在極低流速或緻密地質（如黏土）中，濃度梯度的自然擴散率。
* 一階衰減常數 (Decay Rate, Lambda): 污染物因生物降解或化學反應產生的半衰常數（預設 0 代表保守型不衰減物質）。

[時間與濃度 / Time & Concentration]
* 污染源寬度 (Source Width, Y): 假設洩漏源在垂直於水流方向上的有效寬度。
* 模擬時間 (Advection Time, t): 污染物自洩漏發生起算的傳輸時間（天）。
* 稀釋標準 (Dilution Threshold, C_dil) [僅 MEMO/COPRO 模式]: 判定「是否被監測井偵測到」的無因次相對濃度標準（通常設為 C/C0 = 0.001）。
* 初始濃度 (Source Conc., C0) [僅 PLUME 模式]: 洩漏起點的絕對污染濃度（如 10.0 mg/L）。
* 邊界閾值 (Threshold, Cmin) [僅 PLUME 模式]: 污染團繪製的最低邊界（建議設定為法規標準值，如 0.005 mg/L），低於此值的區域將不予繪製。
* 抽樣次數 (Iterations) [僅 COPRO 模式]: 蒙地卡羅模擬的執行次數（預設 100）。次數越高，機率分佈越精確。

---------------------------------------------------------
【三、 輸出與資料保存】
---------------------------------------------------------
模擬完成後，系統會自動在 QGIS 畫布上產出對應的網格點位、多邊形範圍圖層與流向箭頭，並套用專業的漸層設色與透明度渲染。

點擊確認視窗中的「Yes」，可啟動【一鍵匯出】功能：
1. 所有的分析圖層將被封裝為標準的 GeoPackage (.gpkg) 空間資料庫。
2. 視覺化樣式會自動同步儲存為 QML 檔，方便未來跨專案拖曳使用。
3. 系統將自動產生一份 .txt 摘要報告，記錄所有關鍵參數。

---------------------------------------------------------
【四、 參考文獻 / References】
---------------------------------------------------------
[1] Domenico, P. A. (1987). An analytical model for multidimensional transport of a decaying contaminant species. Journal of Hydrology, 91(1-2), 49-58.
[2] Domenico, P. A., & Schwartz, F. W. (1998). Physical and Chemical Hydrogeology (2nd ed.). John Wiley & Sons.
[3] Wilson, C. R., Einberger, C. M., Jackson, R. L., & Mercer, R. B. (1992). Design of ground-water monitoring networks using the monitoring efficiency model (MEMO). Ground Water, 30(6), 965-970.
[4] QGIS Development Team. (2026). QGIS Geographic Information System. Open Source Geospatial Foundation Project. http://qgis.osgeo.org
[5] MEMO Groundwater Network Design Plugin. (2026). Spatial evaluation module for Domenico plume interception.


Part II: English Version
=========================================================

[Introduction]
This plugin is developed based on the Domenico (1987) analytical transport model. It is designed for environmental engineering and hydrogeology professionals. Version 1.2 features three core analytical modes for groundwater pollution investigation, plume prediction, and uncertainty risk assessment.

---------------------------------------------------------
[Operational Modes]
---------------------------------------------------------

1. MEMO (Well Network Blind Spot Evaluation)
- Purpose: To evaluate whether an existing or planned monitoring well network can effectively intercept potential pollution leaks within a specific area.
- Logic: Deterministic model. Scans the site polygon and delineates "blind spot areas" that represent monitoring loopholes.
- Input: Source Area Polygon, Well Points.

2. PLUME (Plume Dispersion Simulation)
- Purpose: To predict the absolute concentration distribution and dispersion extent of a contaminant transported by groundwater over a specific time from a release point.
- Logic: Dynamic outward expansion algorithm. Automatically generates boundary-free, high-resolution concentration gradient heatmaps and polygons.
- Input: Source Location Point.

3. COPRO (Probabilistic Risk Assessment)
- Purpose: To assess the risk probability of the well network missing contamination when natural hydrological parameters (velocity, flow direction) exhibit seasonal or measurement uncertainties.
- Logic: Monte Carlo Simulation. Automatically samples hundreds of hydrological scenarios to produce a comprehensive blind spot map with 5 risk levels.
- Input: Source Area Polygon, Well Points.

---------------------------------------------------------
[Parameter Guide]
---------------------------------------------------------

[Spatial & Geometry]
* Grid Size: Scanning resolution (default 25m). Smaller values yield finer heatmaps but exponentially increase computation time.
* Flow Angle: The absolute principal axis of contaminant transport (0° is due East, 90° is due North).
* Angle Variance [COPRO only]: Simulates uncertainty in flow direction (e.g., ±15° represents seasonal shifts).

[Hydrogeology]
* L_disp / T_disp: Longitudinal and transverse dispersivity of contaminants, usually related to the scale of transport distance.
* Average Velocity: Actual groundwater flow velocity (v = K*i/ne).
* Vel. Variance [COPRO only]: Simulates velocity fluctuations caused by measurement errors or geological heterogeneity.
* Molecular Diffusion (D*): The natural diffusion rate in very low-velocity or dense geology (e.g., clay).
* Decay Rate (Lambda): The first-order decay constant from biodegradation or chemical reactions (default 0 represents conservative substances).

[Time & Concentration]
* Source Width (Y): The assumed effective width of the source perpendicular to the flow direction.
* Advection Time (t): Transport time (in days) since the release occurred.
* Dilution Threshold (C_dil) [MEMO/COPRO only]: Dimensionless threshold to determine if contamination is "detected" (typically C/C0 = 0.001).
* Source Conc. (C0) [PLUME only]: Absolute initial concentration at the release point (e.g., 10.0 mg/L).
* Threshold (Cmin) [PLUME only]: Minimum rendering boundary for the plume (e.g., 0.005 mg/L). Areas below this value will not be drawn.
* Iterations [COPRO only]: Number of Monte Carlo samples (default 100). Higher counts yield more precise distributions.

---------------------------------------------------------
[Output & Export]
---------------------------------------------------------
After simulation, the system generates grid points, polygons, and flow arrows on the canvas with professional graduated styling and transparency.

Click "Yes" in the confirmation dialog to use [One-Click Export]:
1. All analysis layers are packaged into a standard GeoPackage (.gpkg).
2. Visualization styles are synced as QML files for easy reuse.
3. A summary report is generated in .txt format, recording all key parameters.

---------------------------------------------------------
[References]
---------------------------------------------------------
[1] Domenico, P. A. (1987). An analytical model for multidimensional transport of a decaying contaminant species. Journal of Hydrology, 91(1-2), 49-58.
[2] Domenico, P. A., & Schwartz, F. W. (1998). Physical and Chemical Hydrogeology (2nd ed.). John Wiley & Sons.
[3] Wilson, C. R., Einberger, C. M., Jackson, R. L., & Mercer, R. B. (1992). Design of ground-water monitoring networks using the monitoring efficiency model (MEMO). Ground Water, 30(6), 965-970.
[4] QGIS Development Team. (2026). QGIS Geographic Information System. Open Source Geospatial Foundation Project. http://qgis.osgeo.org
[5] MEMO Groundwater Network Design Plugin. (2026). Spatial evaluation module for Domenico plume interception.