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.
Time Stepping Taking Too Long on laptop
Posted 2023年7月10日 GMT-4 07:22 Microfluidics, Mesh 9 Replies
Please login with a confirmed email address before reporting spam
Hi,
I'm running a 2D model on comsol and it taking too long compute. I used time step of range(0,0.1,0.5). I have attacched the mph file
Please login with a confirmed email address before reporting spam
I have attacched the mph file
Except you didn't. Try it again.
Please login with a confirmed email address before reporting spam
I have attacched the mph file
Except you didn't. Try it again.
Sorry, here is it
Attachments:
Please login with a confirmed email address before reporting spam
Without any knowledge of the problem statement, and just looking at your model file, I see several inconsistencies that you may want to address to get at the cause of the problem.
- Your units are declared as SI, therefore, you should specify units for all your parameters. For example, the parameters d and w I assume are units of length (m). It appears that the geometry is in the right units by default. But perhaps other parts of your model are not.
- Specifically, everywhere you see the type shown in orange color, the code is shown a corresponding error message with units error.
- You are using the default mesh with an extremely fine mesh. This causes the solver to have nearly a million degrees of freedom. Hence, the very first time step appears to loop forever. Suggest changing this to much smaller mesh and obtain a coarse solution first; especially to debug your model. I did so, and it failed quickly that an inconsistent initial condition and could not establish an initial condition. I suspect this is related to your orange errors and inconsistent units.
Please send a corrected model file if you continue to get stuck.
-------------------James D. Freels, Ph.D., P.E.
Please login with a confirmed email address before reporting spam
Without any knowledge of the problem statement, and just looking at your model file, I see several inconsistencies that you may want to address to get at the cause of the problem.
- Your units are declared as SI, therefore, you should specify units for all your parameters. For example, the parameters d and w I assume are units of length (m). It appears that the geometry is in the right units by default. But perhaps other parts of your model are not.
- Specifically, everywhere you see the type shown in orange color, the code is shown a corresponding error message with units error.
- You are using the default mesh with an extremely fine mesh. This causes the solver to have nearly a million degrees of freedom. Hence, the very first time step appears to loop forever. Suggest changing this to much smaller mesh and obtain a coarse solution first; especially to debug your model. I did so, and it failed quickly that an inconsistent initial condition and could not establish an initial condition. I suspect this is related to your orange errors and inconsistent units.
Please send a corrected model file if you continue to get stuck. Okay, thank you so much
Please login with a confirmed email address before reporting spam
Hi James,
I was able to check the unit. but I still have issue with my model. I'm using a pi/2 as the BC at the middle of the an rectangular channel and zero everywhere else for the theta and no slip BC for the u and v. For the initial also choose an initial condition that match the BC but I still received an error of** inconsistence initial conditions**. I have tried all the possible suggestions but couldn't work.
I have attached the mph file
Attachments:
Please login with a confirmed email address before reporting spam
Hello Ijuptil Joseph,
I have attached a modified model file where I have made some changed and performed some debugging. What I have done is included as comments in the model description at the root level. I have proven (to myself anyway) that the model has an instability caused by the coupling term for volume force between the PDE and the creeping flow physics. This term is very complex, and I don't have time to get into it deeply to determine what is the source of the term and if it is code up right. I will leave that to you.
Also, I suggest you refer to the application library and examine how others have used the microfluids physics module to model their applications. I noticed you had no pressure boundary, no inlet/outlet boundary, or no open boundary; i.e., the flow was completely enclosed. I added an open boundary out of necessity to get the flow equations to solve. If you want to keep the geometry enclosed from fluid flow, then you need at least a pressure Dirichlet constraint somewhere. Suggest looking at the classic cavity problem for an example of that (also in the application library).
One way to help in debugging your volume-force coupling issue is the gradually increase the size of the force until it reaches the desired magnitude. Perhaps that is what you were doing with the parametric sweep.
You have an interesting problem, and I would like to work on it more, but no time right now. Please post back here when you get it solved and running so we know what you did.
Regards.
-------------------James D. Freels, Ph.D., P.E.
Attachments:
Please login with a confirmed email address before reporting spam
Hi James, thank so much. I will definitely post it when I finally get it running.
Please login with a confirmed email address before reporting spam
Hi both, I agree with Jim that you don't need that amount of mesh and also you need to define the pressure somewhere in your system (i.e. pressure point constraint). Also agree that your model is highly non-linear and that makes a problem. My recommendations are:
1- Reduce the number of meshes in the bulk, but use small meshes at the two points at the upper boundary where the flow is disturbed.
2- introduce your volume forces gradually to the set of equations: gx = (x-component of the volume force) * step1(t[1/s]), and gy = (y-component of the volume force) * step1(t[1/s])
3- I also noticed that the frequency of the sinusoidal force that makes a change in the flow is too high. In this case, you have to select your time steps small enough to be able to capture the sinusoidal variation in the volume force, and hence the velocity field.
I hope these help.
Amin
Please login with a confirmed email address before reporting spam
Thank you Amin. T will cehck this
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.