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.
Where is the error of my model ? (model file has been attached)
Posted Feb 13, 2011, 9:58 p.m. EST Version 4.0, Version 4.2 12 Replies
Please login with a confirmed email address before reporting spam
About the model:
I want to simulate ice melting, and I used the Heat Transfer (ht) and Level Set (ls) Physics in comsol, Level Set is used to track the moving interface (the phase change region). For simplicity, I just chose 1D space.
Geometry: a line (two domains)
Physics: Heat transfer and Level set
Material properties, Initial and Boundary conditions see the comsol model file attached
Instructions of the Variables defined in model:
1. Vn, The moving interface velocity, it was determined by the Stefan condition, i.e., (rhoS+rhoL)/2*Lheat*Vn=qs-ql, where (rhoS+rhoL)/2 is the mean density, Lheat is the latent heat, Vn is the velocity, and (qs-ql) is the heat flux difference across the interface (in model, it is boundary 2). I used down() and up() these two operators to calculate the heat flux on the downside ( ql) and upside (qs) of the interior boundary, and variables ql and qs were defined on boundary 2, details please see the model file attached.
2. The Level set variable “phi” was used to calculate the density “rho”, heat capacity “Cp”, and heat conductivity “k” throughout the entire geometry.
Ps: I have already do the same simulation successfully by ALE, but now I want to try the Level set.
Attachments:
Please login with a confirmed email address before reporting spam
It seems that you have an issue with the Jacobian of your variable "qsl", which means that the derivatives along x & y are not well defined, it could come from the fact that qsl is only defined on Boundary 4, while Vn is global
What if you define an average operator aveop1() on boundary 4, then redefine as GLOBAL
qsl = aveop1((qs-ql)*nx)
and remove the one on the boundary
Then i believe it would work better, BUT I'm not sure that is enough to give you correct results !!
One thing to note, by using an aveop1() instead of a mapping operator you are removing any variation along Y and apply a mean value, redistributed. Normally one should use a mapping operator to get the element by element variation transferred
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Hi
It seems that you have an issue with the Jacobian of your variable "qsl", which means that the derivatives along x & y are not well defined, it could come from the fact that qsl is only defined on Boundary 4, while Vn is global
What if you define an average operator aveop1() on boundary 4, then redefine as GLOBAL
qsl = aveop1((qs-ql)*nx)
and remove the one on the boundary
Then i believe it would work better, BUT I'm not sure that is enough to give you correct results !!
One thing to note, by using an aveop1() instead of a mapping operator you are removing any variation along Y and apply a mean value, redistributed. Normally one should use a mapping operator to get the element by element variation transferred
--
Good luck
Ivar
Thank you very much, Ivar
Yes, it works when I define qsl = aveop1((qs-ql)*nx). This is reasonable when the downside or upside heat flux along the boundary are all equivalent, i.e., the local Vn are not various. But if the local Vn are various, doing average is not reasonable, that's why I didn't define an average operator. You said mapping operator, maybe it can work, what kind of mapping should I choose?
Please login with a confirmed email address before reporting spam
You can then use Linear extrusion operator from the boundary 4 onto the domain 1.
But anyhow, what annoys me is that you use boundary 4 as initial conditions AND to define your fluxes, but this boundary is fixed, its not moving so your result cannot be correct/as desired, I believe
Either you redefine the flux with a boolean operator so that it moves with the velocity vn, or you redefine the geometry with an external parametrical sweep, based on the velocity, but then what's the difference with an ALE ?
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Hi
You can then use Linear extrusion operator from the boundary 4 onto the domain 1.
But anyhow, what annoys me is that you use boundary 4 as initial conditions AND to define your fluxes, but this boundary is fixed, its not moving so your result cannot be correct/as desired, I believe
Either you redefine the flux with a boolean operator so that it moves with the velocity vn, or you redefine the geometry with an external parametrical sweep, based on the velocity, but then what's the difference with an ALE ?
--
Good luck
Ivar
Thank you, Ivar
About the linear extrusion, in Source Selection I chose boundary 4, and Source Vertices I chose 3 and 4 (the endpoint of boundary 4), but I have question about the choosing of Destination Vertices, which two Vertices should I choose?
By the way, I have looked up the Users' Guide about the general and linear extrusion, I tried to use the general extrusion, but I also encountered question about the x-expression and y-expression of both the Destination Map and Source Map. I tried the default expressions but error occurred.
Please login with a confirmed email address before reporting spam
Hi
You can then use Linear extrusion operator from the boundary 4 onto the domain 1.
But anyhow, what annoys me is that you use boundary 4 as initial conditions AND to define your fluxes, but this boundary is fixed, its not moving so your result cannot be correct/as desired, I believe
Either you redefine the flux with a boolean operator so that it moves with the velocity vn, or you redefine the geometry with an external parametrical sweep, based on the velocity, but then what's the difference with an ALE ?
--
Good luck
Ivar
I use Level set to tracking the moving interface, and the initial interface is boundary 4. You said "but this boundary is fixed", I don't quite understand this sentence, you mean boundary 4 is just the position of the initial interface, although the ice melting interface moves forward (tracked by Level set), the boundary 4 will be fixed forever. So the heat flux difference across the boundary 4 (I did currently) is not the heat flux across the moving interface (this is the heat flux difference I really need)
Please login with a confirmed email address before reporting spam
I agree, I'm not used to (little experienced) with the level set method, but what puzzles me is that you use the boundary 4 (the fixed one) to define your qs ql and qsl AT EACH time step, while for me that one should move, no ?
when I look at the results I get, the ice heats up to 80°C (?) but the boundary is not really moving just becoming fuzzier
But I do really know what to propose and I have little time just now to test it out, and I'm interested to learn ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Hi
I agree, I'm not used to (little experienced) with the level set method, but what puzzles me is that you use the boundary 4 (the fixed one) to define your qs ql and qsl AT EACH time step, while for me that one should move, no ?
when I look at the results I get, the ice heats up to 80°C (?) but the boundary is not really moving just becoming fuzzier
But I do really know what to propose and I have little time just now to test it out, and I'm interested to learn ;)
--
Good luck
Ivar
Thank you, Ivar
Yes, I thought boundary 4 would move, but it didn't, like what I said, boundary 4 is just the position where the initial interface is, and it doesn't move together with the interface, i.e., boundary 4 is not the moving interface (my personal opinion). Actually, the qs, ql I really wanted to define is on the moving interface, but now boundary 4 is fixed. Thank you!
Please login with a confirmed email address before reporting spam
then we agree, I'm not enough familiar with the level set method to know what to propose, but it's very interesting to hear how you can around it. I believe your examples (ALE and level set comparison) is worth to be uploaded in the Model Exchange, at least when you are happy with both, those are really nice examples of physics and the use of COMSOL
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Hi
then we agree, I'm not enough familiar with the level set method to know what to propose, but it's very interesting to hear how you can around it. I believe your examples (ALE and level set comparison) is worth to be uploaded in the Model Exchange, at least when you are happy with both, those are really nice examples of physics and the use of COMSOL
--
Good luck
Ivar
Thank you, Ivar. I will try to make it, and if you have any afflatus, you can tell me through message, your advice is helpful.
Please login with a confirmed email address before reporting spam
Did you manage to have the initial interface wall move or shrink? i am working on evaporation where the initial liquid height reduce over time. If you managed would you kindly guide me on the same?
Thanks
Please login with a confirmed email address before reporting spam
Hello Yu,
Did you manage to have the initial interface wall move or shrink? i am working on evaporation where the initial liquid height reduce over time. If you managed would you kindly guide me on the same?
Thanks
Hi, for evaporation, you can refer to the example "freezing drying", this example is built in v3.5.
Please login with a confirmed email address before reporting spam
If the phase change interface coincides with the boundary at t=0 and the boundary is fixed at all time, but the phase change interface changes with time, how do I definite this interface in this situation?
Best regards
Zuoyue
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.