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.

Different solvers and their influence on the obtained results

Please login with a confirmed email address before reporting spam

Hello!

I'm currently using COMSOL for a 3D microfluidics problem and I am performing a mesh refinement study. As I am quite new on the subject, I am only using different element sizes for a default mesh, and going through some of the sizes. So I have some questions about this:

1) Are these default meshes good enough for a two phase flow problem? I've seen in literature that quadrilateral (cubic in 3D) are use in such studies if the mesh is mentioned in the first place.

2) I started by using the 'Coarse' mesh and went all the to the 'Finer' one. I notived that COMSOL used PARDISO to solve the problem when the mesh was 'Coarse', 'Normal' and 'Fine', and the results were getting closer, as expected. However, GMRES was used with the 'Finer' mesh, and the results were a bit different. I was monitoring the fluid velocity at different points and in two plots, the velocity was quite higher than the two preivous ones. So I was wondering if the solver has any effect on the result, and how can I make COMSOL use PARDISO so I can be coherent all the way.



2 Replies Last Post 20 nov 2019, 12:01 GMT-5
Mats Nigam COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 18 nov 2019, 11:23 GMT-5

Dear Andre´,

1) The default meshes are just suggestions which are based on the size of the domain geometry (bounding box), and depending on the turbulence model you may get different numbers of boundary layers. A good CFD mesh should be based on the Reynolds number, Weber number and/or any other non-dimensional number characterizing the flow. Usually, a good strategy is to start from a default mesh and edit the sequence such that the relevant physics can be resolved. It doesn't matter so much which shape of element you use for a two-phase flow simulation, but more how well you resolve the interfaces. You could for example use adaptive mesh refinement to get a more accurate representation of the interfaces.

2) There seems to be something strange happening here. Would you be able to share your model so that we can investigate? The solver sequence will switch from a direct to an iterative solver when the number of degrees of freedom is large enough. If you have enough memory on your computer, you can override this behavior by setting the linear solver in the segregated step for velocity and pressure (or which ever step you want to modify) to an existing direct solver, or to one that you add yourself by right-clicking the "Time-Dependent Solver" node.

Best regards, Mats

Dear Andre´, 1) The default meshes are just suggestions which are based on the size of the domain geometry (bounding box), and depending on the turbulence model you may get different numbers of boundary layers. A good CFD mesh should be based on the Reynolds number, Weber number and/or any other non-dimensional number characterizing the flow. Usually, a good strategy is to start from a default mesh and edit the sequence such that the relevant physics can be resolved. It doesn't matter so much which shape of element you use for a two-phase flow simulation, but more how well you resolve the interfaces. You could for example use adaptive mesh refinement to get a more accurate representation of the interfaces. 2) There seems to be something strange happening here. Would you be able to share your model so that we can investigate? The solver sequence will switch from a direct to an iterative solver when the number of degrees of freedom is large enough. If you have enough memory on your computer, you can override this behavior by setting the linear solver in the segregated step for velocity and pressure (or which ever step you want to modify) to an existing direct solver, or to one that you add yourself by right-clicking the "Time-Dependent Solver" node. Best regards, Mats

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 20 nov 2019, 12:01 GMT-5

Dear Mats,

First of all, thank you for your reply.

About the meshes, tuning the size parameters should be enough to obtain an accurate representation of the interface is that so? For another run, I used a different oil (phase) on my system with lower viscosity. The issue I am having is that the diffuse interface (currently using the phase field) is actually too difuse, I'm not getting a relatively sharp interface between both phases (it's diffuse all along the channel). Again, is it a matter of a poor mesh definition? Should the elements have the same size where it matters?

Yes, I agree that it should be a matter of degrees of freedom my model has. I believe I have to simulate the whole model in 3D which will render a big mesh and create a lot of degrees of freedom. What would you recommend? Should I use a 'normal' mesh and the refine it where I have the interface? And about the solver, is it true that a direct solver should be used when possible?

I have two additional questions, if you could take the time to answer. The first one is related to the GIF file I'm uploading now. It represents the volume fraction (only water to be easier to see) and the velocity field at the outlet. I set that circle on top as an outlet with 5 μL/min. What it seems strange to me is the fact that there is something coming in to the model as soon as the blue phase gets near the outlet. Does this makes sense? It seems that the other phase started to flow out of the model but then flows in again. Shouldn't setting the outlet boundary condition restrain the flow to go out?

One last question is about the initial values. I inputed the initial interface at the correct boundaries, and it seems to hold when t = 0. However, in some situations, when I study the next frame, the interface is way further than it should be. Is there a reason for this?

I cannot really upload the model as the file is extremely large, I will try to reduce it in the meantime and post it.

Once again, thank you very much for your help,

André

Dear Mats, First of all, thank you for your reply. About the meshes, tuning the size parameters should be enough to obtain an accurate representation of the interface is that so? For another run, I used a different oil (phase) on my system with lower viscosity. The issue I am having is that the diffuse interface (currently using the phase field) is actually too difuse, I'm not getting a relatively sharp interface between both phases (it's diffuse all along the channel). Again, is it a matter of a poor mesh definition? Should the elements have the same size where it matters? Yes, I agree that it should be a matter of degrees of freedom my model has. I believe I have to simulate the whole model in 3D which will render a big mesh and create a lot of degrees of freedom. What would you recommend? Should I use a 'normal' mesh and the refine it where I have the interface? And about the solver, is it true that a direct solver should be used when possible? I have two additional questions, if you could take the time to answer. The first one is related to the GIF file I'm uploading now. It represents the volume fraction (only water to be easier to see) and the velocity field at the outlet. I set that circle on top as an outlet with 5 μL/min. What it seems strange to me is the fact that there is something coming in to the model as soon as the blue phase gets near the outlet. Does this makes sense? It seems that the other phase started to flow out of the model but then flows in again. Shouldn't setting the outlet boundary condition restrain the flow to go out? One last question is about the initial values. I inputed the initial interface at the correct boundaries, and it seems to hold when t = 0. However, in some situations, when I study the next frame, the interface is way further than it should be. Is there a reason for this? I cannot really upload the model as the file is extremely large, I will try to reduce it in the meantime and post it. Once again, thank you very much for your help, André

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.