sinusoidal time dependent boundary condition - pde toolbox

1 vue (au cours des 30 derniers jours)
yonatan s
yonatan s le 21 Juin 2017
Commenté : yonatan s le 23 Juin 2017
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.

Réponse acceptée

Alan Weiss
Alan Weiss le 21 Juin 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 commentaire
yonatan s
yonatan s le 23 Juin 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?

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by