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.

Using deformed mesh for moving boundary

Please login with a confirmed email address before reporting spam

Hello everyone

I would like to ask your kind help for the expression of prescribed displacement deformed mesh. I attached the jpg for showing the case, the boundary changed from AB at time t0 to curve ACB at time t, the coordinates are as shown. And I set the prescribed x displacement dx as: ((1-(y-1)^2)^0.5)/t, but unfortunately I can't get an expected result. The error is ''attempt to evaluate negative power of zero, failed to evaluate expression''. I suppose the problem might be due to the two edge points A(0,2), B(0,0) lead to a expression 0^0.5 which is not exist? And how could I modify this to include only true value?

But I also tried some simple expression for get an idea to see how it works with the coordinate y and time-dependent t, e.g. y; t (running and make sense); but y*t got error of no convergence, and seems that the two internal varibles not compatible together which should not be the case. I found someone had once posted the similar case of changing velocity profile and also expression including cordinates x and t. Could anyone of you nicely help me with this problem. Thanks a million to you.

Best regards,

Yuexia


5 Replies Last Post 7 mag 2011, 08:17 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 6 mag 2011, 11:27 GMT-4
Hi,

The first error you receive usually refers to the fact that you have some variable that has a zero values and its derivative is the inverse of a square root so that Comsol cannot evaluate it.

One way to patch this problem is to add inside the expression of your variable a very small value, usually the constant 'eps'. So, maybe, you may re-write your x-displacement as:
((1-(y-1)^2+eps)^0.5)/t

Howver I note that you have the time in the denominator therefore such an expression should go to infinity when t=0 (if I am not missing anything).

Regarding the second error I am sorry but I have difficulties to understand the expression you used, could you please describe it more in detail?

Cheers

Hi, The first error you receive usually refers to the fact that you have some variable that has a zero values and its derivative is the inverse of a square root so that Comsol cannot evaluate it. One way to patch this problem is to add inside the expression of your variable a very small value, usually the constant 'eps'. So, maybe, you may re-write your x-displacement as: ((1-(y-1)^2+eps)^0.5)/t Howver I note that you have the time in the denominator therefore such an expression should go to infinity when t=0 (if I am not missing anything). Regarding the second error I am sorry but I have difficulties to understand the expression you used, could you please describe it more in detail? Cheers

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 6 mag 2011, 16:49 GMT-4
Thank you for your imediate reply and the tip, Amir.

But I still can't figure out the correct result with ((1-(y-1)^2+eps)^0.5)/t, the inside eps eliminate the 0 value problem. But since I want the profile changing with time continuously, so need to define it as time dependent, that is why I divide it with time t (denominator). t equas 0 at the initial time might also be the problem as you pointed. But what else alternative you propose?

Concerning to the other errors, I just set dx to be y or t or y*t, just to see how the straight line will deform with these trial expressions, just to see the effect. I can't understand why it always report convergence error with y*t.

And, Amir. Would you please kindly try it for me please as set in the .jpg? I just tried to post a workplace .mph, but still too large to upload, dont know why for it is such a simple case. Would you...please...?!

Merci beaucoup!

Yuexia


Thank you for your imediate reply and the tip, Amir. But I still can't figure out the correct result with ((1-(y-1)^2+eps)^0.5)/t, the inside eps eliminate the 0 value problem. But since I want the profile changing with time continuously, so need to define it as time dependent, that is why I divide it with time t (denominator). t equas 0 at the initial time might also be the problem as you pointed. But what else alternative you propose? Concerning to the other errors, I just set dx to be y or t or y*t, just to see how the straight line will deform with these trial expressions, just to see the effect. I can't understand why it always report convergence error with y*t. And, Amir. Would you please kindly try it for me please as set in the .jpg? I just tried to post a workplace .mph, but still too large to upload, dont know why for it is such a simple case. Would you...please...?! Merci beaucoup! Yuexia

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 6 mag 2011, 17:56 GMT-4
Hi,

First of all, it may sound obvious or even stupid but you need to understand the physics behind your problem, that is you first need to think hard about why you want the wall to move and how.

Second, definitely you cannot divide something by zero, that is you cannot have an expression divided by t because when t goes to zero then the ratio goes to infinity.


Third, moving boundaries are quite nasty to model but above all there not enough information about your model, is it fluid dynamics? Structural mechanics? If it is CFD, is there an inlet? An outlet? What is supposed to be?

Cheers
Hi, First of all, it may sound obvious or even stupid but you need to understand the physics behind your problem, that is you first need to think hard about why you want the wall to move and how. Second, definitely you cannot divide something by zero, that is you cannot have an expression divided by t because when t goes to zero then the ratio goes to infinity. Third, moving boundaries are quite nasty to model but above all there not enough information about your model, is it fluid dynamics? Structural mechanics? If it is CFD, is there an inlet? An outlet? What is supposed to be? Cheers

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 7 mag 2011, 04:03 GMT-4
Hi Amir, Really thank you a lot. I simplified the case when post it. My aim is originally simulating dissolution of a droplet (immisable phase, low solubility, dissolving slowly) into the bulk water flow-Hydraulic dynamics. I start from 2D, and then it comes to the problem of diminishing interface (inverse as in the simplified condition), from curved surface to the final straight line. I found that maybe I need to assum a known total time duration for the droplet to be dissolved, e.g. 1h=3600 s (which will be investigated from lab experiments), define dx as e.g. (((1-(y-1)^2+eps)^0.5)*t)/3600, I tried this expression, but no convergence too. And I don't know how to define it properly.

And after realizing the moving boundary first then I could add inflow concentration by other physics, the spf, chds, etc. But feel a bit frustrated in the dilemma at the first step. Hard to imagine how could do more complicated 3D...

I am quite a beginner to use COMSOL. And I guess that you are quite a sophisticated and typical modeler, working even at mid-night.

Hopefully I had explained you clear the problem I was facing and your advises and help will be greatly appreciated.

Cheers

Yuexia
Hi Amir, Really thank you a lot. I simplified the case when post it. My aim is originally simulating dissolution of a droplet (immisable phase, low solubility, dissolving slowly) into the bulk water flow-Hydraulic dynamics. I start from 2D, and then it comes to the problem of diminishing interface (inverse as in the simplified condition), from curved surface to the final straight line. I found that maybe I need to assum a known total time duration for the droplet to be dissolved, e.g. 1h=3600 s (which will be investigated from lab experiments), define dx as e.g. (((1-(y-1)^2+eps)^0.5)*t)/3600, I tried this expression, but no convergence too. And I don't know how to define it properly. And after realizing the moving boundary first then I could add inflow concentration by other physics, the spf, chds, etc. But feel a bit frustrated in the dilemma at the first step. Hard to imagine how could do more complicated 3D... I am quite a beginner to use COMSOL. And I guess that you are quite a sophisticated and typical modeler, working even at mid-night. Hopefully I had explained you clear the problem I was facing and your advises and help will be greatly appreciated. Cheers Yuexia

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 7 mag 2011, 08:17 GMT-4
Hi,

All right now the picture is a bit clearer. The best way to start now is to go through some examples already present int he showcase section, here are some that I think may help you:

www.comsol.it/showroom/gallery/1994/

www.comsol.it/showroom/gallery/177/

www.comsol.it/showroom/gallery/3969/

www.comsol.it/showroom/gallery/1445/

ALE is one option to go for this problem another one is the level set method, you may start going through the models first, run them on your own and modify them little by little. However, I always found important to look into books ad publications that may help understand better the physical background.

Cheers
Hi, All right now the picture is a bit clearer. The best way to start now is to go through some examples already present int he showcase section, here are some that I think may help you: http://www.comsol.it/showroom/gallery/1994/ http://www.comsol.it/showroom/gallery/177/ http://www.comsol.it/showroom/gallery/3969/ http://www.comsol.it/showroom/gallery/1445/ ALE is one option to go for this problem another one is the level set method, you may start going through the models first, run them on your own and modify them little by little. However, I always found important to look into books ad publications that may help understand better the physical background. Cheers

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.