Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all articles
Browse latest Browse all 26527

Initial values - how to input vector rather than constant?

$
0
0
I'm using 1D General Form PDE to solve some coupled PDEs.

I have set up the PDEs and boundary conditions. Now I have to set up initial conditions.

Say I have 5 mesh points. Then for a particular parameter I want the inital conditions [0,2,4,6,8] or something, so the left-most mesh point is zero and the right-most mesh point initial condition is 8.

However when I click on Model 1 > General Form PDE > Initial values node, I see a place to enter the initial conditions, however this appears to only accept a constant. So if I enter "3" then I get [3,3,3,3,3]. I have tried the following:

range(0,8/(5-1),8) --- it accepts this input but gives an error at runtime about not recognizing "range"

or I simply tried

[0,2,4,6,8] --- however it does not accept this input.

How to give a non-constant input initial condition?

Thanks!

Viewing all articles
Browse latest Browse all 26527

Trending Articles