sinusoidal time dependent boundary condition - pde toolbox

1 view (last 30 days)
hello,
i would like to have a sinusoidal time dependent BC. i didnt find an example of this in the related docs.
this is the relevant part of the code
tlist=0:30:360;
Flux= @(region,state) sin(2*pi*state.time)*F
b=applyBoundaryCondition(model,'neumann','Face',1,'q',0,'g',Flux,'Vectorized','on');
i want the bc to osicllate with time period of 30. is this the correct way of doing this?
thank you.

Accepted Answer

Alan Weiss
Alan Weiss on 21 Jun 2017
Depending on your software version, that looks correct. The relevant documentation is here. But, if you are hoping to calculate the sin of something in degrees (not radians), use the sind function instead of sin.
Alan Weiss
MATLAB mathematical toolbox documentation
  1 Comment
yonatan s
yonatan s on 23 Jun 2017
i have another question about this topic. my solution matrix is of vectors with the solutions at time (2pi*t), which will always be zero for my time periods (t=30,60,90..), so how could i see any oscillations?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!