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.
how to find the maximum of a variable during evaluation in order to define heterogeneous medium parameters
Posted Sep 13, 2010, 12:17 PM EDT 0 Replies
Please login with a confirmed email address before reporting spam
I want to simulate diffusion of pressure for a simple 1D model. The right boundary I set to symmetry. On the left I defined a Dirichelt-type boundary condition simulating constant pressure up to a certain time t0 which is then penetrating into my 1D medium using the diffusion equation.
After the time t0 I stop the constant pressure injection. As a results the pressure drops to zero at the left side of the boundary. But also within the medium the pressure starts to decrease. However due to diffusion the shape of the individual solutions with time are characterized by a certain maximum.
Here comes my problem:
I know want to define a medium diffusivity D depending on these particular maxima of pressure. Until the pressure increases locally at a certain location up to the corresponding pressure maximum the diffusivity should be D1 = 10. After the maximum of pressure has reached and pressure starts to drop I want to freeze the medium diffusivity to another value D2 = 3.
Thus the medium diffusivity should look like:
D = 10*(t<=t0) + ( D1*(t>t0 && p(x,t) <= PMax(x,t) + ...)
But I can't figure out the pressure values of the maxima during evaluation of my problem.
Has onyone a hint for me?
Hello Nicolas Hummel
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.