How to apply boundary condition on nodes using recommended workflow of PDE Toolbox?

4 ビュー (過去 30 日間)
Aditi
Aditi 2018 年 1 月 27 日
コメント済み: Aditi 2018 年 1 月 31 日
Can we use a function handle to applyBoundaryCondition on region type "Nodes"?
If not, is there any other way of apply boundary conditions on edge nodes using recommended workflow of PDE Toolbox?

回答 (1 件)

Ravi Kumar
Ravi Kumar 2018 年 1 月 29 日
Hi Aditi,
It is currently not possible to apply BC onto Nodes directly. Can you provide a bit more details on your use case, with example code, to see if there is a workaround to achieve the end goal.
Regards, Ravi
  1 件のコメント
Aditi
Aditi 2018 年 1 月 31 日
My problem is related to applying boundary condition on nodes, and the boundary condition value is dependent on value of parameter a.My code is :
if a>2
BC = @(region,state) [(state.u(1,:)-E_0a)+state.u(2,:).*(E_0c-state.u(1,:));...
-state.u(2,:).*(E_0c-state.u(1,:))];
else
BC = @(region,state) [state.u(2,:).*(E_0c-state.u(1,:));...
-state.u(2,:).*(E_0c-state.u(1,:))];
end
applyBoundaryCondition(model,'neumann','Edge',5:20,'g',BC,'Vectorized','off');
I need to define value of boundary condition at nodes for which a parameter is known. For example, if for node 2, if a > 2, then apply boundary condition 1 on that node, and boundary condition 2 for rest of the nodes.
Is there any way to do this using recommended workflo of PDE Toolbox?

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

カテゴリ

Help Center および File ExchangeBoundary Conditions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by