Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Calculated initial values NOT the same as specified

Please login with a confirmed email address before reporting spam

I have seen this now in 2 simulations... The initial values specified in Initial Value Domain nodes are NOT the Initial Values the solver ouputs, either at t=0 of the solution nor when asking the "Get Initial Value."

Is there a reason for this as the Initial Values are being changed dramatically when solving (i.e. half the value for IVs that had value, and non-zero for some IVs that were zero)?

Any help is greatly appreciated.

Tim

1 Reply Last Post 11 juil. 2016, 12:06 UTC−4
COMSOL Moderator

Hello Timothy Fawcett

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 11 juil. 2016, 12:06 UTC−4
Hello Tim,

The reason for this is likely that you specified initial conditions that are inconsistent with the boundary conditions you picked. At t=0, this inconsistency causes under-/over-shoot in the first element next to the boundary (assuming that you are using quadratic elements, which is the default for most physics), see attached picture showing what I mean in 1D.

The solution consists in specifying consistent conditions. If for instance you are trying to model how a system responds to a sudden ramp-up of a field on a boundary, then use a function that starts at the initial value and ramps up to the final value in your BC. Instantaneous changes in value are frequently unphysical anyways.

I hope this helps future readers of this thread.
Best,
Jeff

PS: This is closely related to the third possible cause for negative concentrations discussed at this link: www.comsol.com/support/knowledgebase/952/
Hello Tim, The reason for this is likely that you specified initial conditions that are inconsistent with the boundary conditions you picked. At t=0, this inconsistency causes under-/over-shoot in the first element next to the boundary (assuming that you are using quadratic elements, which is the default for most physics), see attached picture showing what I mean in 1D. The solution consists in specifying consistent conditions. If for instance you are trying to model how a system responds to a sudden ramp-up of a field on a boundary, then use a function that starts at the initial value and ramps up to the final value in your BC. Instantaneous changes in value are frequently unphysical anyways. I hope this helps future readers of this thread. Best, Jeff PS: This is closely related to the third possible cause for negative concentrations discussed at this link: https://www.comsol.com/support/knowledgebase/952/

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.