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

4 visualizaciones (últimos 30 días)
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?

Respuestas (1)

Ravi Kumar
Ravi Kumar el 29 de En. de 2018
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 comentario
Aditi
Aditi el 31 de En. de 2018
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?

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by