Defining non-constant Neumann Boundary Conditon
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am a little unsure if I am using the correct syntax for defining my non-constant neumann boundary condition for a time-dependent PDE.
specifyCoefficients(model,'Face',2,'m',0,'d',1,'c',Da,'a',0,'f',0);
specifyCoefficients(model,'Face',3,'m',0,'d',1,'c',Dg,'a',0,'f',0);
applyBoundaryCondition(model,'neumann','Edge',8,'q',0,'g',@gcoeff2);
function f = gcoeff2(~,state)
rhog = 1250;
rhoa = 1.150;
Da = 2.82*10^-4;
f = (Da.*rhoa./rhog).*(state.ux+state.uy);
end
Esentially I have two areas occupied by different substances, which share a common edge, Edge 8. I want to apply the equal flux boundary condition at edge 8 such that
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/264712/image.png)
Is the code for my function correct? Is it necessary for me to add in locations even though the gradient is defined by "state.ux" and "state.uy"? Also, since it is a time dependent PDE do I need to multiply everything by state.time?
0 Kommentare
Antworten (1)
Ravi Kumar
am 22 Jan. 2020
You do not need to model the interface BC explicitly. This condition should be automatically satisfied in the solution.
Regards,
Ravi
0 Kommentare
Siehe auch
Kategorien
Mehr zu Boundary Conditions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!