Filter löschen
Filter löschen

sinusoidal time dependent boundary condition - pde toolbox

2 Ansichten (letzte 30 Tage)
yonatan s
yonatan s am 21 Jun. 2017
Kommentiert: yonatan s am 23 Jun. 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.

Akzeptierte Antwort

Alan Weiss
Alan Weiss am 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 Kommentar
yonatan s
yonatan s am 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?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by