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.

2 sets of PDE equations with same variable

Please login with a confirmed email address before reporting spam

Dear all,

I have a Comsol model in which I have two almost identical sets of general PDE equations. This is because i first solve them with a stationary solver to find stable initial conditions and then introduce the time dependent parts and solve it with a time dependent solver. This way i avoid rapid changes in the first steps and get a more accurate result and a more stable solver.

I use the same depend variables in the two sets of equations so i can directly transfer the solution from the stationary solver to the initial conditions for the time dependent. However i get an error from the reset history command that says "Inconsistent dependable variable decleration. Previous unit: m^-2*m. Unit: m^-1*m."

Due to the answers given in this thread: www.comsol.com/community/forums/general/thread/12320/ I tried to rebuild the model from scratch, only to find I cannot add 2 sets of PDE equations with the same variable. I have to make them with different variables and then change the variable afterwards. This is what courses the reset history error. Apart from this one error the program seems to be working fine but now I'm uncertain if this is actually the wrong way to use the two different solvers since Comsol won't make two sets with the same variable from the start? I can't use the same equations for the steady state and the time dependent since the steady state solver can't handle time dependent functions needed in the time solver.

I have attached the program if anyone want to take a closer look.

Thank you in advance for your time
Mathias Christensen



1 Reply Last Post 28 mars 2013, 16:53 UTC−4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28 mars 2013, 16:53 UTC−4
Hi

often you can get around the missing definition of t=0 for a stationary solver, just preceding a time dependent one, by adding in the root Parameter a dummy t=0 and then arrange that your BC values at t=0 are those of the steady state, then you can use the same PDE's, run first a stationary solver, store, use the results as the initial values for a time dependent solver and have all under one "study node" to be initiated and solved in one click ;)

--
Good luck
Ivar
Hi often you can get around the missing definition of t=0 for a stationary solver, just preceding a time dependent one, by adding in the root Parameter a dummy t=0 and then arrange that your BC values at t=0 are those of the steady state, then you can use the same PDE's, run first a stationary solver, store, use the results as the initial values for a time dependent solver and have all under one "study node" to be initiated and solved in one click ;) -- Good luck Ivar

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.