boundary conditions and solvepde
Show older comments
Hello again and hope someone can guide me.
I have different edges of a plate, and those edges have different boundary conditions depending on the time (i extrapolate the values)
I have this code:
in=0;
tim=[ts(5) ts(10) ts(15)];
for t = 1:numel(tim)
currentTime = tim(t);
for k = 1:numel(perimeter)
edge = perimeter(k);
in=in+1;
applyBoundaryCondition(model,"dirichlet","Edge",edge,"u",1,"EquationIndex",1);
%applyBoundaryCondition(modelTwoDomain,"mixed","Edge",[edge,edge],"u",bcfunc,"EquationIndex",2,"q",[0 0],"g",0);
end
in=0;
end
When I debug I can see the the boundry values are store correctly in modeltwodomain (name of my model).boundaryconditions.
The problem appears when I go to solve the system:
res=solvepde(modelTwoDomain,tim);
% Access the solution at the nodal locations
sol=res.NodalSolution;
and I check the value of sol(65,1,1); 65 being a node in my first edge. It should give me the value I extrapolated with the first time value, but seems just to keep the third value.
Is there anyway that I can somehow store the n different values for the n time instances when I solve the pde system?
Hope someone read me and can help. I would really appreciate any guidance.
Accepted Answer
More Answers (0)
Categories
Find more on Structural Mechanics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!