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.

Time-Dependent initial solution violates specified initial conditions

Please login with a confirmed email address before reporting spam

I am trying to build a dye-washout model (using Reacting Flow in Porous Media physics to predict the time-dependent concentration of a dilute species). I'm able to run simulations for varying lengths of time, but I'm having issues with my initial conditions.

I specify what the initial concentration of the dilute species should be with an Initial Values node, but when I run the time-dependent study the t0 concentration does not match what I specify. For example, I specify concentration should uniformly be 0.1 mol/m^3 at t=0, but instead the solution will show a non-uniform concentration distribution with an average ~5-50% lower than the Initial Values node indicates. The discrepancy from the specified initial concentration also changes with study length (i.e. ~5% error for study from t=0-0.1sec, ~50% error for study from t=0-10sec).

Am I specifying initial conditions incorrectly? Is there a way to strictly enforce initial conditions?

4 Replies Last Post 30 mars 2016, 07:46 UTC−4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 25 mars 2016, 08:44 UTC−4
Hi Garrett,
I am not familiar with your application, but I would recommend checking that your initial conditions are consistent with your boundary conditions. If not, look no further.
Best,
Jeff
Hi Garrett, I am not familiar with your application, but I would recommend checking that your initial conditions are consistent with your boundary conditions. If not, look no further. Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 25 mars 2016, 11:50 UTC−4

Hi Garrett,
I am not familiar with your application, but I would recommend checking that your initial conditions are consistent with your boundary conditions. If not, look no further.
Best,
Jeff


Thanks Jeff! I'm not entirely sure what specifically you're suggesting I look at to verify everything is consistent. I've got a flow-through system with a single inlet (no species inflow) and outlet (with species outflow). Initial concentration in the fluid domain should be non-zero (as I'm specifying with an Initial Condition node), which over time should approach zero as fluid is washed out with "clean" fluid entering the domain. Right now the t0 concentration for the time dependent solver is non-zero, but not what I specify with the Initial Condition node.

Where specifically do you think I might be running into issues?

I don't understand what my issue is here, but I was able to set up a workaround by adding a Stationary solver step before my Time Dep step and setting my stationary solution as the initial solution. Still very interested in figuring out what was wrong with my first approach if you have any more thoughts though!
[QUOTE] Hi Garrett, I am not familiar with your application, but I would recommend checking that your initial conditions are consistent with your boundary conditions. If not, look no further. Best, Jeff [/QUOTE] Thanks Jeff! I'm not entirely sure what specifically you're suggesting I look at to verify everything is consistent. I've got a flow-through system with a single inlet (no species inflow) and outlet (with species outflow). Initial concentration in the fluid domain should be non-zero (as I'm specifying with an Initial Condition node), which over time should approach zero as fluid is washed out with "clean" fluid entering the domain. Right now the t0 concentration for the time dependent solver is non-zero, but not what I specify with the Initial Condition node. Where specifically do you think I might be running into issues? I don't understand what my issue is here, but I was able to set up a workaround by adding a Stationary solver step before my Time Dep step and setting my stationary solution as the initial solution. Still very interested in figuring out what was wrong with my first approach if you have any more thoughts though!

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 25 mars 2016, 12:13 UTC−4
The problem is that your initial concentration is a non zero value, but on the inlet your boundary condition is zero. The two are not consistent: what is the concentration at the inlet at t0? zero or non-zero?
These types of inconsistencies lead to the initial solution either undershooting or overshooting the initial value in the very first layer of elements along the offending boundary.
The fix is to make the BC consistent with the initial condition by making the BC a function of time that drops from the non-zero initial concentration to zero over a short period of time, and then stays zero.
Best,
Jeff

PS: See also my posting in this thread: www.comsol.com/community/forums/heat-transfer/thread/60591 . It's the same idea.
The problem is that your initial concentration is a non zero value, but on the inlet your boundary condition is zero. The two are not consistent: what is the concentration at the inlet at t0? zero or non-zero? These types of inconsistencies lead to the initial solution either undershooting or overshooting the initial value in the very first layer of elements along the offending boundary. The fix is to make the BC consistent with the initial condition by making the BC a function of time that drops from the non-zero initial concentration to zero over a short period of time, and then stays zero. Best, Jeff PS: See also my posting in this thread: http://www.comsol.com/community/forums/heat-transfer/thread/60591 . It's the same idea.

Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 30 mars 2016, 07:46 UTC−4
Hi,

As for the sensitivity to the end time of the solution, see also

www.comsol.com/community/forums/general/thread/108101/

Regards,
Henrik
Hi, As for the sensitivity to the end time of the solution, see also http://www.comsol.com/community/forums/general/thread/108101/ Regards, Henrik

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.