




已阅读5页,还剩6页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Problem 1The ground flow equation for 1D heterogeneous, isotropic porous medium with a constant aquifer thickness is given by:Where h(x,t) is the hydraulic head, T(x) is the transmissivity, and S is the storativity. The boundary conditions imposed are constant head hL (15m) and hR (5m) at the left and right ends of soil column, respectively. The initial condition is 0 or random number at each node. The length of aquifer is 1m (L=1m). The storativity is 1 (S = 1).Develop a MATLAB program which can handle a heterogeneous transmissivity field using the implicit method.1) Test the program for the case of homogenous parameters, and compare the results with the results generated from flow equation with homogenous transmissivity field (i.e., )2) Test the program for patch- heterogeneous T field, which comprises a two-zone T field with a fivefold difference in transmissivity (T1=5T2, T1=0.01m2s-1, T2=0.002m2s-1 ; or, T1=0.2T2, T1=0.002m2s-1, T2=0.01m2s-1) and an interface in the middle of the domain.Problem 1解答1 理论推导非均质一维地下水运动方程为: 如右图,各个点的水头分别为,水头和之间水力传导系数为。将方程(1)进行离散化:设,则 设 则 所以: 设, 则, , 2 编码实现根据第一部分的理论推导编写代码2.1 均质情况下一维地下水运动function plot_Data = oneDimGroudwaterFlowHom(hL,hR,L,S,T,method,dx,dt)% Finite difference method to solve 1-D flow equation% Writed By Dongdong Kong, 2014-01-07% Sun Yat-Sen University, Guangzhou, China% emal: % -% one dimension groundwater flow model script% which can handle a heterogeneous transmissivity field% -% because of T value, this function only suit for patch-heterogeneous T % field comprises a two-zone T field, or homogeneous field. you can Modify% input discreted T value to suit other heterogeneous situation.% -% hL % left constant hydraulic head (m)% hR % left constant hydraulic head (m)% L % the length of aquifer% S % storativity% T % transmissivity% method% forward or backward approximation% -x=0:dx:L; nx=length(x);w=T/S*dt/dx/dx;h=rand(nx,1);h(1)=hL; h(end)=hR; times = 100;Result = zeros(nx,times+1); if strcmp(method,forward) % forward approximation W=(1-2*w)*diag(ones(nx,1),0)+. w*diag(ones(nx-1,1),1)+. w*diag(ones(nx-1,1),-1); W(1,1)=1;W(1,2)=0; W(nx,nx)=1;W(nx,nx-1)=0; for i=1:times+1 Result(:,i)=h; h=W*h; endelseif strcmp(method,backward) % backward approximation w=T/S*dt/dx/dx; W=(1+2*w)*diag(ones(nx,1),0) - . w*diag(ones(nx-1,1),1) - . w*diag(ones(nx-1,1),-1); W(1,1)=1;W(1,2)=0; W(nx,nx)=1;W(nx,nx-1)=0; for i=1:times+1 Result(:,i)=h; h=Wh; endelse warning(error method input, method can be only set forward,backward)endfigure timeID=0 1 5 10 20 40 100+1;plot_Data=Result(:,timeID);plot(x,plot_Data,linewidth,1.5)legend(t= 0,t= 1,t= 5,t= 10,t= 20,t= 40,t= 100)2.2 非均质情况下一维地下水运动function plot_Data = oneDimGroudwaterFlowHet(hL, hR, L, S, T)% Finite difference method to solve 1-D flow equation% Writed By Dongdong Kong, 2014-01-07% Sun Yat-Sen University, Guangzhou, China% emal: % -% one dimension groundwater flow model script% which can handle a heterogeneous transmissivity field% -% because of T value, this function only suit for patch-heterogeneous T % field comprises a two-zone T field, or homogeneous field. you can Modify% input discreted T value to suit other heterogeneous situation.% -% hL % left constant hydraulic head (m)% hR % left constant hydraulic head (m)% L % the length of aquifer% S % storativity% T % transmissivity% -nx=50;x=linspace(0,L,nx*2+1);dx=x(2)-x(1);dt = 0.1;N = length(x);Ti=repmat(T(1),1,nx),repmat(T(2),1,nx); W=zeros(N);w=dt/dx/dx/S;for i=2:N-1 W(i, i+1) =-w*Ti(i); W(i, i) =1+w*(Ti(i)+Ti(i-1); W(i, i-1)=-w*Ti(i-1);endW(1,1)=1;W(end,end)=1;h=rand(N,1);h(1)=hL; h(end)=hR;times=10000; %simualtion timesResult=zeros(N,times+1); figure,hold onfor i=1:times+1 Result(:,i)=h; h=Wh;endtimeID=0 1 5 10 20 40 100 1000*10+1;plot_Data=Result(:,timeID);plot(x,plot_Data,linewidth,1.5)legend(t= 0,t= 1,t= 5,t= 10,t= 20,t= 40,t= 100,t=1000)2.3 主函数clear,clc% Writed By Dongdong Kong, 2014-12-30% one dimension groundwater flow model script% which can handle a heterogeneous transmissivity fieldhL = 15; % left constant hydraulic head (m)hR = 5; % left constant hydraulic head (m)L = 1; % the length of aquiferS = 1; % storativity% # question1.1dt=1;dx=0.2; %for delta_w 0.5T=0.01; method=forward;Hom_forward = oneDimGroudwaterFlowHom(hL,hR,L,S,T,method,dx,dt);dx=0.01;T=0.01; method=backward;Hom_backward = oneDimGroudwaterFlowHom(hL,hR,L,S,T,method,dx,dt);T=0.01 0.01;Hom = oneDimGroudwaterFlowHet(hL,hR,L,S,T);% # question1.2T=0.01 0.002;Het_situ1 = oneDimGroudwaterFlowHet(hL,hR,L,S,T);T=0.002 0.01;Het_situ2 = oneDimGroudwaterFlowHet(hL,hR,L,S,T);save(oneDimFlowPlotData.mat,Hom_forward,Hom_backward,Hom,Het_situ1,Het_situ2)3. 结果输出Question1.1 result:由图一可以看出非均质插分和均质情况下向前插分、向后插分,计算结果和收敛速度大致相同,考虑到向前插分中,因此向前差分时取,其他情况取。图一. 非均质与均质求解下的差异,从左到右分别为非均质T插分、均质情况下向后插分、均质情况下向前插分Question1.2 result:T1=0.01m2/s, T2=0.002m2/s 和 T1=0.2T2, T1=0.002m2/s, T2=0.01m2/s非均质T情况下插分结果如图二。图二. 非均质情况下两个情景下插分结果Problem 2Use rainfall from 8 stations to estimate the annual rainfall for 6 stations using the kriging ordinary methods.The locations of the 8 stations where rainfall is available are as follows:No.station namelatitudelogitude1boulder40.033105.2672castle39.383104.8673green9ne39.267104.7504lawson39.767105.6335longmont40.252105.1506manitou38.850104.9337parker39.533104.6508woodland39.100105.083The 15-year rainfall records for 8 the stations are available in the Excel file “Rain_8Stations_Known.xls”The locations of the 6 stations where rainfall need to be estimated are as follows:No.station namelatitudelogitude1byers39.750104.1332estes40.383105.5173golden39.700105.2174green9se39.100104.7335lakegeor38.917105.4836morrison39.650105.200The annual rainfall for 6 the stations are available in the Excel file “AnnualRain_6Stations_ToBeEstimated.xls”. This will be used to calculate the estimate error by using different interpolation methods1) For each of 6 stations (i.e., byers, estes, golden, green9se, lakegeor, and morrison) where the annual will be estimated, estimate the annual rainfall based on rainfall at 8 stations (i.e., boulder, castle, green9ne, lawson, longmont, manitou, parker and woodland) using the kriging method.2) Estimate the annual rainfall using the inverse-distance-square method and the arithmetic mean method, and compare the error from the kriging method.3) Calculate the error variance for kriging method at each of 6 stationsNote: use an exponential function to model covariance: , where a and b are parameters to be determined, and d is the distance between two points.Problem 2解答1. Kriging MATLAB 编码如下KrigineInterpolate.mclear,clc% Writed By Dongdong Kong, 2014-01-08% Sun Yat-Sen University, Guangzhou, China% email: % -dataDir = ./data/; stationInfo_known= xlsread(dataDir,LatitudeLogitude_8Stations_Known.xls);stationInfo_pre = xlsread(dataDir,LatitudeLogitude_6Stations_ToBeEstimated.xls);Rain_known = xlsread(dataDir,Rain_15year_8Stations_Known.xls);Rain_preReal = xlsread(dataDir,AnnualRain_6Stations_ToBeEstimated.xls);stationInfo_known = stationInfo_known(:,3,4);stationInfo_pre = stationInfo_pre(:,3,4);nYear = size(Rain_known,1); Np_know = 8; % station number of know dataNp_pre = 6; % station number to predictRainPredict = zeros(nYear, Np_pre);for k = 1:Np_pre stationInfo = stationInfo_pre(k,:); stationInfo_known; nStation = size(stationInfo,1); dispPoint=zeros(nStation); % calculate two station distance for i=1:nStation dispPoint(:,i) = distance(stationInfo, stationInfo(i,:); end % covariance mat_cor = cov(Rain_known); % simulate Cov function x = dispPoint(2:end,2:end); y = mat_cor; x_tri = tril(x); y_tri = tril(y); X = x_tri(:); ind = X=0; Y = y_tri(:); % delete diag zeros data X_nozeros = X(ind); Y_nozeros = Y(ind); Y_zeros = diag(y); % General model Exp1: % y = a*exp(b*x) fitResult, gof = expFit(X_nozeros, Y_nozeros); a = fitResult.a; b = fitResult.b; C0 = mean(Y_zeros) - b; Cov_fit = reshape(feval(fitResult,x),8,8); for i=1:length(Cov_fit) Cov_fit(i, i) = C0 + b; end C = Cov_fit,ones(8,1); ones(1,8),0; dh = dispPoint(2:end,1); D = feval(fitResult,dh);1; W = CD; %last element is mu w = W(1:end-1); RainPredict(:,k) = Rain_known*w;endRain_kriging = mean(RainPredict)expFit.mfunction fitresult, gof = expFit(X1, Y1)%MATLAB AUTO GENERATE CODE expFit FUNCTIONxData, yData = prepareCurveData( X1, Y1 );% Set up fittype and options.ft = fittype( exp1 );opts = fitoptions( ft );opts.Display = Off;opts.Lower = -Inf -Inf;opts.StartPoint = 871049.657333104 -6.29140824382876;opts.Upper = Inf Inf;% Fit model to data.fitresult, gof = fit( xData, yData, ft, opts );% -计算结果保留在第二问的表格里。2. 反距离权重插值、算术平均值和kriging插值的误差比较反距离权重插值采用R语言下的工具包gstat的idw函数进行,对于每个站点采用8个雨量站进行插值。IDW Interpolation R 代码如下:library(gstat)library(maptools)# Loading required package: sp# Checking rgeos availability: TRUErm(list=ls()setwd(F:/Users/kongdd/Documents/MATLAB/finalWork/krigineInterpolation) stationInfo_known=read.table(./data/LatitudeLogitude_8Stations_Known.txt,sep=t,head=T)stationInfo_pre = read.table(./data/LatitudeLogitude_6Stations_ToBeEstimated.txt,sep=t,head=T)Rain_known = read.table(./data/Rain_15year_8Stations_Known.txt,sep=t,head=T)Rain_preReal = read.table(./data/AnnualRain_6Stations_ToBeEstimated.txt,head=T)Rain_known - t(Rain_kn
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 工业机器人技术在制造中的应用
- 工业机器人技术与工业自动化
- 工业机器人与旋转灌装机的结合应用
- 工业污染防治与绿色生产实践
- 工业污染监测与治理策略探讨
- 工业绿色能源利用与管理
- 工业污染防治的法律措施与实践
- 工业生产线设备维修培训
- 工业节能减排的先进技术与实践
- 工业节能减排的技术与策略研究
- 外科护理队伍发展方向
- 《N235提取锗新工艺》
- 2024-2030年中国汽车注塑模具行业竞争战略及发展潜力研究报告
- qc初级推进者考试试题及答案
- 060177统计学(江苏开放大学本科期末试卷)
- SAP S4HANA 用户操作手册-FICO-006-财务月结
- 化妆品监督管理条例培训2024
- 数字经济学 课件全套 第1-15章 数字经济学基础 - 数字经济监管
- 2024年山东省青岛市中考地理试题卷(含答案及解析)+2023年中考地理及答案
- 中医适宜技术-中药热奄包
- 中国医院质量安全管理第2-13部分:患者服务临床用血
评论
0/150
提交评论