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.

FLUID DYNAMIC-sea velocity field

Please login with a confirmed email address before reporting spam

Hi!
i'm Irene from Italy and i'm doing my final work for the thesis in engineering.
I'm using 'fluid dynamic' of COMSOL MULTIPHYSICS 3.5.
I need to find the sea velocity field in an area of 3 km that includes the port of Gandia(a spanish city) .
I did the draw in comsol; in 'subdomain setting' i included only dencity=1000 and dynamic viscosity=0.001,
in 'inlet' i included only pressure(t)=111125.
In 'boundary condition' i chose for sea side 'open boundary -no viscous stress'; to simulate the port and the coast i chose 'wall no slip'; for the entry of port i chose 'inlet-velocity 0.1'; near the port there is a river so as boundary condition for that one i chose 'inlet -velocity=1'
the quality of meshes looks good.
When i try yo do 'stationary run' i have this error:

FILED TO FIND A SOLUTION:THE RELATIVE RESIDUAL (0.00081) IS GREATER THAN THE RELATIVE TOLLERANCE. RETURNED SOLUTION HAS NOT CONVERGED.

Sombody knows what causes this error?
If anyone know it ,please can you say me?
THANKS

5 Replies Last Post 28 mars 2010, 04:08 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 15 mars 2010, 11:01 UTC−4
Hi Irene

I cannot tell like that what is wrong but I can give some clues, as for me this error happens when I have either 1) a model with non-coherent or non phyiscal BC (boundary conditions) or 2) that it is particularly non-linear and I have not given it enough iterations or linked: I'm asking for a relative tolerance too small w.r.t. the previous item.

But these solver settings depend on the solver you are using, it is difficult to say more, my advice here take a read through the solver section of the doc, and look at the examples you can find that appear closest to your model.

Now for your BC, as you describe them, one thing strikes me (or my sens of physics). You talk about a closed area for the port with one inlet and one outlet, and two given velocities. As its at sea level I assume you have also some gravity and you do not expect to see the sea level in the port go under that of the free-sea or ?

So if you define a constant speed on the outlet, for a given speed at the inlet, assuming that the inlet /outlet sections remains the same (up to the sea hight level) you might be overconstraining your problem here, which makes the solver having some difficulties to find a valid solution.

Or have I missed something ?

In anycase good luck, that's a nice model you have there !
Ivar
Hi Irene I cannot tell like that what is wrong but I can give some clues, as for me this error happens when I have either 1) a model with non-coherent or non phyiscal BC (boundary conditions) or 2) that it is particularly non-linear and I have not given it enough iterations or linked: I'm asking for a relative tolerance too small w.r.t. the previous item. But these solver settings depend on the solver you are using, it is difficult to say more, my advice here take a read through the solver section of the doc, and look at the examples you can find that appear closest to your model. Now for your BC, as you describe them, one thing strikes me (or my sens of physics). You talk about a closed area for the port with one inlet and one outlet, and two given velocities. As its at sea level I assume you have also some gravity and you do not expect to see the sea level in the port go under that of the free-sea or ? So if you define a constant speed on the outlet, for a given speed at the inlet, assuming that the inlet /outlet sections remains the same (up to the sea hight level) you might be overconstraining your problem here, which makes the solver having some difficulties to find a valid solution. Or have I missed something ? In anycase good luck, that's a nice model you have there ! Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 mars 2010, 11:36 UTC−4
Hi Ivar KJELBERG!

I have a problem with my model for sloshing. I can find velocity field, pressure ... but i can't find the frequency of sloching. Could you please show me how to?

Thanks a lot.

Hi Ivar KJELBERG! I have a problem with my model for sloshing. I can find velocity field, pressure ... but i can't find the frequency of sloching. Could you please show me how to? Thanks a lot.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 25 mars 2010, 08:57 UTC−4
Hola Ivar,
Really tanks for reply,
i tried to change my boundary condition, but i have always the same error, i did't try to change solver because i could read that 'direct solver' ,that is the one that i used for stationary analysis,looks good,but i'm not sure of that; it's a little bit difficult for me to explain whell my problem with an e-mail becouse of my bad english,so i'll send you my model with real geometry ( in which you can see the river and the port) and a simple geometry in which i tried to use the same boundary condition for to see if was the geometry the problem but is not so,i think!.the scripts are in comsol 3.5.
These project is just a test, so for now there aren't real values of currents and it not includ wind stress...etc.
if you will have time to see the model and you will see somthing of really wrong in physics,please can you say me that?if you have not time don't worry..:)
Thanks a lot
Regards Irene
Hola Ivar, Really tanks for reply, i tried to change my boundary condition, but i have always the same error, i did't try to change solver because i could read that 'direct solver' ,that is the one that i used for stationary analysis,looks good,but i'm not sure of that; it's a little bit difficult for me to explain whell my problem with an e-mail becouse of my bad english,so i'll send you my model with real geometry ( in which you can see the river and the port) and a simple geometry in which i tried to use the same boundary condition for to see if was the geometry the problem but is not so,i think!.the scripts are in comsol 3.5. These project is just a test, so for now there aren't real values of currents and it not includ wind stress...etc. if you will have time to see the model and you will see somthing of really wrong in physics,please can you say me that?if you have not time don't worry..:) Thanks a lot Regards Irene


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 27 mars 2010, 12:13 UTC−4
Hi

Well there is always some difficulties and tweaking to get the fluid solving to run smoothly. This is not my speciality so there are other that might have some better ideas.
My concusions so far are that your model seems very mesh and etha dependent.

I have always some doubs about "outlet" conditions, therefore I use rather outlet constant pressure and set a p0 = 1[atm] as a constant and use it as pressure initial values, as well as outlet non viscuous constant pressure, (where you have "open boundary no viscuous stress BC's). As you have several corner too, you could try the physics properties corner smoothing= YES.
I would even have used, as outlet boundary a half a circle to get a constant radius from the port outlet but that perhps more an esteatical issue (simpler though you have only 1 "sea boundary).

If you take your model and select a sea boundary, then change the boundary model from "open boundary" to "outlet with a pressure <> 0" and take a look at the physics equations boundaries you will see COMSOL adds a weak term to force the pressure on the boundary.

I see you have started with a simpler case, that is the "best way", so long the simple case is not converging there is little hope for a complex port.

Check your solver parameters, I would use stationary-stationary (not transient-stationary) or play with a triansient build-up of the flow first (use smoothing functions heavisude as in the fluid ns example flow around a cylinder.

I have played a little with your model, it will still not converge but it gets further if you increase the visuousity and set my proposed boundary conditions, so I believe it has to do with some of the damping parameters, or the realtive mesh size. It could be that one need to use adaptive meshing to have it concentrate the mesh better at critical points.

Furthermore, I have notiecd with simple fluid flow cases, that having a transient build up of the flow (and starting with a cylinder/tube section to build up a parabolic constant flow, and then save use this as a starting points is often, better than having just an open "flat inlet" to get a parabolic shape use the "s" parameter of the edge and multiply the inlet by v_in*4*s*(1-s) (s goes from 0 to 1 along each edge in 2D). You need a multiplication factor 1 or 3/2 depending if you want the max speed or the average speed.

But I can change the relative velocity of your two rivers and notice that this changes strongly the convergence. To see how the thing behaves turn on the plotting during solving (Plot settings: non-linear steps), you will see how the flow changes, while solving, and this shows that the solution seem to stabilise rather quickly. Perhaps you should try a parametric sweep with different flow velocities of your "high speed river.

Add the streamlines to see the flow pattern better, you will notice that your sea boundary has also some influences.

By the way looking at the streamlines and the difference of flow from the two rivers, I suspect that you have a Venturi effect from the higher external river flow going along the port outlet, a nice study there (you should add some tide flow and sea streaming too, no ?)

Hope someone else have the time to give some clues how to get this to solve better

Good luck
Ivar
Hi Well there is always some difficulties and tweaking to get the fluid solving to run smoothly. This is not my speciality so there are other that might have some better ideas. My concusions so far are that your model seems very mesh and etha dependent. I have always some doubs about "outlet" conditions, therefore I use rather outlet constant pressure and set a p0 = 1[atm] as a constant and use it as pressure initial values, as well as outlet non viscuous constant pressure, (where you have "open boundary no viscuous stress BC's). As you have several corner too, you could try the physics properties corner smoothing= YES. I would even have used, as outlet boundary a half a circle to get a constant radius from the port outlet but that perhps more an esteatical issue (simpler though you have only 1 "sea boundary). If you take your model and select a sea boundary, then change the boundary model from "open boundary" to "outlet with a pressure 0" and take a look at the physics equations boundaries you will see COMSOL adds a weak term to force the pressure on the boundary. I see you have started with a simpler case, that is the "best way", so long the simple case is not converging there is little hope for a complex port. Check your solver parameters, I would use stationary-stationary (not transient-stationary) or play with a triansient build-up of the flow first (use smoothing functions heavisude as in the fluid ns example flow around a cylinder. I have played a little with your model, it will still not converge but it gets further if you increase the visuousity and set my proposed boundary conditions, so I believe it has to do with some of the damping parameters, or the realtive mesh size. It could be that one need to use adaptive meshing to have it concentrate the mesh better at critical points. Furthermore, I have notiecd with simple fluid flow cases, that having a transient build up of the flow (and starting with a cylinder/tube section to build up a parabolic constant flow, and then save use this as a starting points is often, better than having just an open "flat inlet" to get a parabolic shape use the "s" parameter of the edge and multiply the inlet by v_in*4*s*(1-s) (s goes from 0 to 1 along each edge in 2D). You need a multiplication factor 1 or 3/2 depending if you want the max speed or the average speed. But I can change the relative velocity of your two rivers and notice that this changes strongly the convergence. To see how the thing behaves turn on the plotting during solving (Plot settings: non-linear steps), you will see how the flow changes, while solving, and this shows that the solution seem to stabilise rather quickly. Perhaps you should try a parametric sweep with different flow velocities of your "high speed river. Add the streamlines to see the flow pattern better, you will notice that your sea boundary has also some influences. By the way looking at the streamlines and the difference of flow from the two rivers, I suspect that you have a Venturi effect from the higher external river flow going along the port outlet, a nice study there (you should add some tide flow and sea streaming too, no ?) Hope someone else have the time to give some clues how to get this to solve better Good luck Ivar

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 2010, 04:08 UTC−4
Hi agan

I played some more, and have the following remarks:

1) time domain: (I'm used to small devices, and times in seconds) here you needhours as time constants as the "h" mesh area is in the 10m^2 domain and velocities are low, below 0.1 m/s hence you need already 100sec or more to cover one element
2) when you get the system to solve for some time you get some nice patterns, but I notice that it does not seem very physical, as I would expect it to be from what I see on satellite images of water mixture outside any river. There is little "cross flow", so one should play with these diffusing parameer better (not my domain). But further there is something that I do not like, the model, just with NS in 2D, is too simple:
normally NS in 2D is for closed volumes (1[m] in Z) with fluid all around. You are un 2D with liquid below, air above and gravity along -Z. This means that you should get the z dependance into the model too as a pressure increase would mean a small Z heith change and therefore also transverse diffusing due to the gravitational forces. Next step would be to include sea depth as for surface waves these have their influence: further equations to enter.

Now this is far outside my experience domain, looks very ineresting though, but my support is limited as I have no spare time to read through that part of my fluidic books and new articles ;)

But there are other outhere I believe that could give some more precis advice

Good luck
Ivar
Hi agan I played some more, and have the following remarks: 1) time domain: (I'm used to small devices, and times in seconds) here you needhours as time constants as the "h" mesh area is in the 10m^2 domain and velocities are low, below 0.1 m/s hence you need already 100sec or more to cover one element 2) when you get the system to solve for some time you get some nice patterns, but I notice that it does not seem very physical, as I would expect it to be from what I see on satellite images of water mixture outside any river. There is little "cross flow", so one should play with these diffusing parameer better (not my domain). But further there is something that I do not like, the model, just with NS in 2D, is too simple: normally NS in 2D is for closed volumes (1[m] in Z) with fluid all around. You are un 2D with liquid below, air above and gravity along -Z. This means that you should get the z dependance into the model too as a pressure increase would mean a small Z heith change and therefore also transverse diffusing due to the gravitational forces. Next step would be to include sea depth as for surface waves these have their influence: further equations to enter. Now this is far outside my experience domain, looks very ineresting though, but my support is limited as I have no spare time to read through that part of my fluidic books and new articles ;) But there are other outhere I believe that could give some more precis advice 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.