| 2 | 1/1 | 返回列表 |
| 查看: 573 | 回復(fù): 1 | ||
wjdwin新蟲 (初入文壇)
|
[求助]
二維TM波,PML邊界,matlab程序。但是仿真結(jié)果有問題,求高手解決
|
|
clc; clear; ft=1.5; fs=20; NX=100;%X方向網(wǎng)格數(shù) NY=150;%Y方向網(wǎng)格數(shù) NA=20;%吸收層厚度 bxrhx=1:100; bxirhx=2:150; byrhy=2:100; byirhy=1:150; bxrez=1:100; byrez=1:150; hx=zeros(100,151); hy=zeros(101,150); ezx=zeros(100,150); ezy=zeros(100,150); sigmamy=hx; sigmamx=hy; sigmax=ezx; sigmay=ezy; sigmamax=0.2; sigma=sigmamax*(NA:-1:1)/NA; sigmam=sigmamax*(2*NA-1:-2:1)/2/NA; sigmamx([1:NA,end:-1:end-NA+1], =repmat([sigmam,sigmam]',1,150);sigmax([1:NA,end:-1:end-NA+1], =repmat([sigma,sigma]',1,150);sigmamy(:,[1:NA,end:-1:end-NA+1])=repmat([sigmam,sigmam],100,1); sigmay(:,[1:NA,end:-1:end-NA+1])=repmat([sigma,sigma],100,1); f1hx=exp(-sigmamy(bxrhx,bxirhx)); f1hy=exp(-sigmamx(byrhy,byirhy)); f2hx=zeros(size(hx)); f2hy=zeros(size(hy)); f2hx(sigmamy == 0)=1/ft; f2hy(sigmamx==0)=1/ft; f2hx(sigmamy~=0)=(1-exp(-sigmamy(sigmamy~=0)))./sigmamy(sigmamy~=0)/ft; f2hy(sigmamx~=0)=(1-exp(-sigmamx(sigmamx~=0)))./sigmamx(sigmamx~=0)/ft; f2hx=f2hx(bxrhx,bxirhx); f2hy=f2hy(byrhy,byirhy); f1ezx=exp(-sigmax); f1ezy=exp(-sigmay); f2ezx=zeros(size(ezx)); f2ezy=zeros(size(ezy)); f2ezx(sigmax==0)=1/ft; f2ezy(sigmay==0)=1/ft; f2ezx(sigmax~=0)=(1-exp(-sigmax(sigmax~=0)))./sigmax(sigmax~=0)/ft; f2ezy(sigmay~=0)=(1-exp(-sigmay(sigmay~=0)))./sigmay(sigmay~=0)/ft; centerx=floor((1+NX)/2); centery=floor((1+NY)/2); for nn=1:150 ezx(centerx,centery)=ezx(centerx,centery)+sin(2*pi*nn/ft/fs); ezy(centerx,centery)=ezy(centerx,centery)+sin(2*pi*nn/ft/fs); hx(bxrhx,bxirhx)=f1hx.*hx(bxrhx,bxirhx)-f2hx.*(ezx(bxrhx,bxirhx)-ezx(bxrhx,bxirhx-1)+ezy(bxrhx,bxirhx)-ezy(bxrhx,bxirhx-1)); hy(byrhy,byirhy)=f1hy.*hx(byrhy,byirhy)+f2hy.*(ezx(byrhy,byirhy)-ezx(byrhy-1,byirhy)+ezy(byrhy,byirhy)-ezy(byrhy-1,byirhy)); ezx=f1ezx.*ezx+f2ezx.*(hy(bxrez+1, -hy(bxrez, );ezy=f1ezy.*ezy-f2ezy.*(hx(:,byrez+1)-hx(:,byrez)); end 程序可以運(yùn)行。但是自己畫出的等位線圖不對(duì),contour(ezx+ezy),contour(hx),contour(hy),都不對(duì),求解決。 |
新蟲 (初入文壇)
| 2 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 070300化學(xué)求調(diào)劑 +4 | 起個(gè)名咋這么難 2026-03-27 | 4/200 |
|
|---|---|---|---|---|
|
[考研] 286求調(diào)劑 +8 | PolarBear11 2026-03-26 | 8/400 |
|
|
[考研] 328求調(diào)劑 +6 | 嗯滴的基本都 2026-03-27 | 6/300 |
|
|
[考研] 一志愿哈爾濱工業(yè)大學(xué)材料與化工方向336分 +4 | 辰沐5211314 2026-03-26 | 4/200 |
|
|
[考研] 329求調(diào)劑 +7 | 鈕恩雪 2026-03-25 | 7/350 |
|
|
[考研] 333求調(diào)劑 +7 | 87639 2026-03-21 | 12/600 |
|
|
[考研] 0703化學(xué)求調(diào)劑 +3 | 丹青奶蓋 2026-03-26 | 5/250 |
|
|
[考研] 中國科學(xué)院深圳先進(jìn)技術(shù)研究院-光纖傳感課題組招生-中國科學(xué)院大學(xué)、深圳理工大學(xué)聯(lián)培 +5 | YangTyu1 2026-03-26 | 5/250 |
|
|
[考研] 289求調(diào)劑 +17 | 碩星赴 2026-03-23 | 17/850 |
|
|
[考研] 081700 調(diào)劑 267分 +11 | 迷人的哈哈 2026-03-23 | 11/550 |
|
|
[考研] 299求調(diào)劑 +4 | 15188958825 2026-03-25 | 4/200 |
|
|
[考研] 材料調(diào)劑 +3 | iwinso 2026-03-23 | 3/150 |
|
|
[有機(jī)交流]
20+3
|
FENGSHUJEI 2026-03-23 | 5/250 |
|
|
[基金申請(qǐng)] 請(qǐng)教下大家 2026年國家基金申請(qǐng)是雙盲審嗎? +3 | lishucheng1 2026-03-22 | 5/250 |
|
|
[考研] 環(huán)境學(xué)碩288求調(diào)劑 +8 | 皮皮皮123456 2026-03-22 | 8/400 |
|
|
[考研] 一志愿重慶大學(xué)085700資源與環(huán)境,總分308求調(diào)劑 +7 | 墨墨漠 2026-03-23 | 8/400 |
|
|
[考研] 276求調(diào)劑 +3 | YNRYG 2026-03-21 | 4/200 |
|
|
[考研] 308求調(diào)劑 +3 | 墨墨漠 2026-03-21 | 3/150 |
|
|
[考研]
|
Grand777 2026-03-21 | 3/150 |
|
|
[考研] 一志愿深大,0703化學(xué),總分302,求調(diào)劑 +4 | 七月-七七 2026-03-21 | 4/200 |
|