How to specify initial conditions for a "Generic System" in the PDE App?

1 次查看(过去 30 天)
Hello,
I'm using the PDE App (R2017a) and got a problem in defining the initial conditions. I defined a "Generic System" with a system of 2 hyperbolic PDEs.The problem is, that I've no idea how to define the initial condition within the "Solve Parameters" window for the two unknowns e.g. for u(t0). What I'm missing is an example about the necessary syntax used in the window.I should specify for u(t0) and u'(t0) functions of x and y for both unknowns u(1) and u(2).
May be you can give me an example for the correct syntax in the window?
The MATLAP Help says "The initial value can be a constant or a column vector of values on the nodes of the current mesh". How is the syntax to specify these "column vectors" to represent my functions depending on x and y??
Thanks a lot for your help!!
Anna

回答(2 个)

Alan Weiss
Alan Weiss 2017-9-14
I believe that you should give u0 and ut0 as specified in the hyperbolic legacy solver.
Alan Weiss
MATLAB mathematical toolbox documentation
  1 个评论
Anna Ukolova
Anna Ukolova 2017-9-15
Dear Alan,
thanks for you response! Unfortunately it doesn't work. First I've tried for u(t0) the expression
char('x.^2 + 5*cos(x.*y)','y')
and I got the error message
Then I tried as indicated in your link as an example for u'(t0) the expression
char('p(1,:).^2 + 5*cos(p(1,:).*p(2,:))','p(2,:)')
to get the nodal positions into play. But again I got an error message
So, I'm very helpless... I still does not understand, what is ment by " ...or a column vector of values on the nodes of the current mesh" and what is the MATLAB expression to achieve that!! Please help...
Thanks a lot, Anna
By the way: If I enter just constant numbers in the "char"-expressions, it's working...but I need the functions to apply the correct initial values at the nodes!

请先登录,再进行评论。


Svetlana Pease
Svetlana Pease 2017-9-29
编辑:Svetlana Pease 2017-9-29
Dear Anna,
As a workaround, you can export the geometry from the app into the MATLAB workspace by selecting the Export Geometry Description option from the Draw menu. Then solve the problem using PDEModel.
Regards,
Svetlana Pease
Technical writer, MathWorks documentation group

产品

Community Treasure Hunt

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

Start Hunting!

Translated by