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

4 次查看(过去 30 天)
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?

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by