フィルターのクリア

Is it possible to store the values at the grid points?if it is how?

3 ビュー (過去 30 日間)
revathy M
revathy M 2017 年 5 月 13 日
コメント済み: KSSV 2017 年 5 月 15 日
Hi! I just have little knowledge on matlab.With what i know I'm just trying to write a code for solving a Block triagonal matrix whose entries are in terms of finite differences.The unknowns has to be found at each grid point.I need to intialize the values at each grid points and have to use the previous grid point value to calculate the unknowns. This is what i have written
%%the intial profiles
deleta=0.2;
for eta=0:deleta:etainf
f_int= fw +((eta)^2)/(2*etainf);
F_int =eta/etainf;
G_int =1-(eta/etainf);
f(:,1)=f_int;
F(:,1)=F_int;
G(:,1)=G_int;
fxbar(1,1)=f(1,1)/delxbar;
Fxbar(1,1)=F(1,1)/delxbar;
Gxbar(1,1)=G(1,1)/delxbar;
Feta(1,1)=F(1,1)/(2*deleta);
end
%%set Boundary condition
F(1,:)=0; %%the value at eta =0
G(1,:)=Gw; %%the value at eta =0
F(:,etainf)=1; %%the value at etainf
G(:,etainf)=1; %%the value at etainf
%%March in the xbar direction
for i =2:L
%%March in the eta direction
for j=2:H
fxbar=(f(i,j)-f(i-1,j))/delxbar;
Fxbar_old=(F(i,j)-F((i-1),j))/delxbar;
Feta_old=(F(i,j+1))-(F(i,j-1))/(2*deleta);
Gxbar_old=(G(i,j)-G(i-1,j))/delxbar;
end
end
But this doesn't help me. Can anyone guide me how to proceed?
  3 件のコメント
revathy M
revathy M 2017 年 5 月 15 日
Hi! I'm working on a fluid mechanics problem.Considered a grid in my region of study.I'm calculating the velocity and temperature profiles at each grid point.Some initial assumptions have been made and has to be calculated and stored at the grid point.Using these values i need to calculate the remaining values at the grid point. My guess is the value at the grid point has to be stored as an array.That's what I've tried. I need to store the value as at f(1,1) =the value obtained at eta =0.At f(2,1)the value obtained at eta=eta+deleta and so on. How do i map the grid points with the array?
Revathy
KSSV
KSSV 2017 年 5 月 15 日
There are many value sin the code which are not defined...give the complete code. It can be made to work.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeControl System Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by