Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

why is calculated initial value always different from specified one.

Ghodsiehsadat Jahanmir

Please login with a confirmed email address before reporting spam

Dear All,

I faced one problem in comsol. I specified one non zero initial value for a time dependent physics(tds). after solving, in post processing step, When I plot the average value of dependent variable over time, the value for initial time is always smaller from what I specified in initial value tab in model. it cause problem specially when I coupled it with Matlab. in every large time step, I run comsol, then transfer data to matlab to calculate one thing then pass it to comsol for next time step. for next time , it should use last time value but it is always smaller and it causes a sudden drop in whole profile at beginning of each time step.

any one have any suggestion?

Thanks

3 Replies Last Post 22.02.2016, 13:41 GMT-5
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 19.02.2016, 08:43 GMT-5
The first thing I would look at is whether your initial value for the dependent variable is consistent with some of the boundary conditions. If the two are not consistent, at t=0 there will be a gradient in that dependent variable in the first element next to the boundary in question, as the software tries to reconcile the conflicting requirements, and that will cause the average to be different from the initial value specified.

If that's the problem, then the solution is to fix the underlying problem, i.e. to specify boundary conditions that are consistent with the initial condition (or vice versa, depending on the physical situation you are trying to model). For instance you could specify a time dependent boundary condition that ramps up from the initial value to a different value over a short period of time.

Just a thought. There could be other reasons.
Jeff
The first thing I would look at is whether your initial value for the dependent variable is consistent with some of the boundary conditions. If the two are not consistent, at t=0 there will be a gradient in that dependent variable in the first element next to the boundary in question, as the software tries to reconcile the conflicting requirements, and that will cause the average to be different from the initial value specified. If that's the problem, then the solution is to fix the underlying problem, i.e. to specify boundary conditions that are consistent with the initial condition (or vice versa, depending on the physical situation you are trying to model). For instance you could specify a time dependent boundary condition that ramps up from the initial value to a different value over a short period of time. Just a thought. There could be other reasons. Jeff

Ghodsiehsadat Jahanmir

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 22.02.2016, 06:34 GMT-5

The first thing I would look at is whether your initial value for the dependent variable is consistent with some of the boundary conditions. If the two are not consistent, at t=0 there will be a gradient in that dependent variable in the first element next to the boundary in question, as the software tries to reconcile the conflicting requirements, and that will cause the average to be different from the initial value specified.

If that's the problem, then the solution is to fix the underlying problem, i.e. to specify boundary conditions that are consistent with the initial condition (or vice versa, depending on the physical situation you are trying to model). For instance you could specify a time dependent boundary condition that ramps up from the initial value to a different value over a short period of time.

Just a thought. There could be other reasons.
Jeff


Dear Jeff,

Thanks for your reply. I think it is the case. because I assumed an initial non zero concentration while at border concentration is zero cause I assumed a perfect sink condition at the surrounding.

thanks so much.
[QUOTE] The first thing I would look at is whether your initial value for the dependent variable is consistent with some of the boundary conditions. If the two are not consistent, at t=0 there will be a gradient in that dependent variable in the first element next to the boundary in question, as the software tries to reconcile the conflicting requirements, and that will cause the average to be different from the initial value specified. If that's the problem, then the solution is to fix the underlying problem, i.e. to specify boundary conditions that are consistent with the initial condition (or vice versa, depending on the physical situation you are trying to model). For instance you could specify a time dependent boundary condition that ramps up from the initial value to a different value over a short period of time. Just a thought. There could be other reasons. Jeff [/QUOTE] Dear Jeff, Thanks for your reply. I think it is the case. because I assumed an initial non zero concentration while at border concentration is zero cause I assumed a perfect sink condition at the surrounding. thanks so much.

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 22.02.2016, 13:41 GMT-5
Yes, then you'd want to specify a time dependent boundary concentration than rapidly drops from the initial value to zero. You can use one of the pre-implemented functions, or specify your own mathematical expression.
Jeff
Yes, then you'd want to specify a time dependent boundary concentration than rapidly drops from the initial value to zero. You can use one of the pre-implemented functions, or specify your own mathematical expression. Jeff

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.