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.

Failed to find consistent initial values

Please login with a confirmed email address before reporting spam

Hi,

I am having problems in getting my simple "rectangular" model to solve. I keep getting:

Failed to find consistent initial values

I have attached the model. I have filleted the edges to try and improve (increase) the mesh elements at the edges and have used flc1hs(t[1/s]-0.1,0.1) to try and improve the initial values. However, I am still having issues. The simulation time is very long 40,000 seconds.

Would anyone be so kind enough to have a look over my model and offer suggestions?

Regards,
Tom


7 Replies Last Post 29.08.2011, 04:44 GMT-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 11.10.2009, 05:31 GMT-4
Hi

I do not think your approach is the best, by making small fillets you get a very uneven mesh size, speially because of your form ratio (length/section sizes).

I would start with a simple rectangular section, no fillets, perhaps make it first much shorter (1/10 ?) to get the model to solve with fewer DoF so its quicker to debug, check that the results are coherent with your expectations, and then add the full length (you can split your prism and start to work on the first short part, then "activate" the rest and extend the properties and BC).

I would also start with square mapped meshes on the rectangle and then sweep along the length. If your solution requires tetrahedrical elements you can always convert the "quad's" to regular "tet's" with the split mesh "convert" function.

Now I'm not 100% sure your error is related to the mesh, be sure your BC (boundary conditions) are correct, this is much easier to debug, step by step, on a smaller model.

There are very many items to get correct when you start to link several physics, building the model up step by step has saved me several times days of work. I have noticed that I mostly fail to set up directly a full complex model with very many DoF's on the first go.

Good luck
Ivar
Hi I do not think your approach is the best, by making small fillets you get a very uneven mesh size, speially because of your form ratio (length/section sizes). I would start with a simple rectangular section, no fillets, perhaps make it first much shorter (1/10 ?) to get the model to solve with fewer DoF so its quicker to debug, check that the results are coherent with your expectations, and then add the full length (you can split your prism and start to work on the first short part, then "activate" the rest and extend the properties and BC). I would also start with square mapped meshes on the rectangle and then sweep along the length. If your solution requires tetrahedrical elements you can always convert the "quad's" to regular "tet's" with the split mesh "convert" function. Now I'm not 100% sure your error is related to the mesh, be sure your BC (boundary conditions) are correct, this is much easier to debug, step by step, on a smaller model. There are very many items to get correct when you start to link several physics, building the model up step by step has saved me several times days of work. I have noticed that I mostly fail to set up directly a full complex model with very many DoF's on the first go. Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11.10.2009, 06:41 GMT-4
Hi Ivar,

Thank you for your constructive feedback!

I have the following questions:


I would start with a simple rectangular section, no fillets, perhaps make it first much shorter (1/10 ?) to get the model to solve with fewer DoF so its quicker to debug


I had started with a simple rectangle and had it solved a few weeks ago, I came back to it last week and it would not solve! (argghhhhh). On reading further about meshing I thought that since most of the activity happens on the walls I would increase the mesh elements at the wall. Do you mean 1/10th scale (x,y,z) or just make the length 1/10th?

then add the full length (you can split your prism and start to work on the first short part, then "activate" the rest and extend the properties and BC).


I am unfamiliar with this technique, would you be kind enough to elborate?

I would also start with square mapped meshes on the rectangle and then sweep along the length. If your solution requires tetrahedrical elements you can always convert the "quad's" to regular "tet's" with the split mesh "convert" function.


OK, although I have tried a swept mesh with no luck, can one be performed on a single subdomain?

Furthermore, I am not sure whether you noticed I have added flc1hs(t[1/s]-0.1,0.1) to some of my boundary conditions to try and help with the initial conditions - however, this is pure guess work on my part. What are the rules (or the rules that work for you) regarding implementing such conditions?

Moreover, I am generally feeling my way through COMSOL and FEM - can you recommend a good source of information and practise? Maybe a few days with you Ivar would help! what are you rates? ;-)

Regards,
Tom

Hi Ivar, Thank you for your constructive feedback! I have the following questions: [quote] I would start with a simple rectangular section, no fillets, perhaps make it first much shorter (1/10 ?) to get the model to solve with fewer DoF so its quicker to debug [/quote] I had started with a simple rectangle and had it solved a few weeks ago, I came back to it last week and it would not solve! (argghhhhh). On reading further about meshing I thought that since most of the activity happens on the walls I would increase the mesh elements at the wall. Do you mean 1/10th scale (x,y,z) or just make the length 1/10th? [quote] then add the full length (you can split your prism and start to work on the first short part, then "activate" the rest and extend the properties and BC). [/quote] I am unfamiliar with this technique, would you be kind enough to elborate? [quote] I would also start with square mapped meshes on the rectangle and then sweep along the length. If your solution requires tetrahedrical elements you can always convert the "quad's" to regular "tet's" with the split mesh "convert" function. [/quote] OK, although I have tried a swept mesh with no luck, can one be performed on a single subdomain? Furthermore, I am not sure whether you noticed I have added flc1hs(t[1/s]-0.1,0.1) to some of my boundary conditions to try and help with the initial conditions - however, this is pure guess work on my part. What are the rules (or the rules that work for you) regarding implementing such conditions? Moreover, I am generally feeling my way through COMSOL and FEM - can you recommend a good source of information and practise? Maybe a few days with you Ivar would help! what are you rates? ;-) Regards, Tom

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 12.10.2009, 02:06 GMT-4
Hi

it was just that I noticed that you have a small cross section for a long "length", hence quicky many elements, and solving such models need time, therefore, my way is to start small and then expand.

So I ment cutting to 1/10 was in the "long" direction, keeping your section as is, just to start with fewer elements.

Next is mess density and regularity: what do you expect would be the smalles scale of your physical phenomena you want to enhance ?

Set the system up to have at least 3-5 nodes per elementary (smallest) dimension of your physical phenomena you want (more if possible, anyhow you should always run once with twice as many elements and check that your results remain stable and similar, if you run out of memory, try half the number of elments, but this is less precise)

With the free mesh you have there a very large range of mesh sizes, and I'm not sure its compatible with the physics you want to study, (something like the Nyquist criteria for data sampling applies also to FEM).

To split a volume (imported or made from COMSOL GUI steps) you can "box" part of it in a rectangle, or prism (3D) with one wall cutting clearly your geometry. then you should play with the boolean operation on the geometry, and delete what's not needed. In this way you generate internal boundaries and you "split" the volumes (in 2D a line is generally enough). There are a few examples in the model set up in the documentation.

Often you can build rather complex geometries by just adding up "boxes" then at the end you do a general "union" followed by a "split" on all item, in this way you end up with elementary items, and you can supress those not needed (but it's difficult to back up and do small changes). Personally I work mostly wih a CAD software, SolidWorks is my preferred one.

Hope this helps, good luck
Ivar
Hi it was just that I noticed that you have a small cross section for a long "length", hence quicky many elements, and solving such models need time, therefore, my way is to start small and then expand. So I ment cutting to 1/10 was in the "long" direction, keeping your section as is, just to start with fewer elements. Next is mess density and regularity: what do you expect would be the smalles scale of your physical phenomena you want to enhance ? Set the system up to have at least 3-5 nodes per elementary (smallest) dimension of your physical phenomena you want (more if possible, anyhow you should always run once with twice as many elements and check that your results remain stable and similar, if you run out of memory, try half the number of elments, but this is less precise) With the free mesh you have there a very large range of mesh sizes, and I'm not sure its compatible with the physics you want to study, (something like the Nyquist criteria for data sampling applies also to FEM). To split a volume (imported or made from COMSOL GUI steps) you can "box" part of it in a rectangle, or prism (3D) with one wall cutting clearly your geometry. then you should play with the boolean operation on the geometry, and delete what's not needed. In this way you generate internal boundaries and you "split" the volumes (in 2D a line is generally enough). There are a few examples in the model set up in the documentation. Often you can build rather complex geometries by just adding up "boxes" then at the end you do a general "union" followed by a "split" on all item, in this way you end up with elementary items, and you can supress those not needed (but it's difficult to back up and do small changes). Personally I work mostly wih a CAD software, SolidWorks is my preferred one. Hope this helps, good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.10.2009, 04:49 GMT-4
Hi Ivar,

I have simplified the model to 1/10th length. I have created a mapped mesh (quads), the mesh generated is the tightest I could get it? It seems that when I ticked the constrained checkbox the mesh always defaulted to the predefined mesh list!?

I have reduced the simulation time to a sensible range, I have added the heaviside function to my initial conditions and STILL the model will not solve!!!

I am glad this is not my first experience with COMSOL!! I have tried simplifying the solver to solve just the emdc app mode, but it still complains about inconsistant initial condition!!!!

I have added the "shorter" model in the hope someone (including COMSOL tech. support) might be able to get me off the ground!

I have more complex models working in the past - this one is flooring me!!

Regards,
Tom
Hi Ivar, I have simplified the model to 1/10th length. I have created a mapped mesh (quads), the mesh generated is the tightest I could get it? It seems that when I ticked the constrained checkbox the mesh always defaulted to the predefined mesh list!? I have reduced the simulation time to a sensible range, I have added the heaviside function to my initial conditions and STILL the model will not solve!!! I am glad this is not my first experience with COMSOL!! I have tried simplifying the solver to solve just the emdc app mode, but it still complains about inconsistant initial condition!!!! I have added the "shorter" model in the hope someone (including COMSOL tech. support) might be able to get me off the ground! I have more complex models working in the past - this one is flooring me!! Regards, Tom


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 12.10.2009, 05:57 GMT-4
Hi

Well I'm on travel so I do not have access to COMSOL so it's difficult for me to answer further just now, later this week I'm in Milano to listen to the COMSOL conference, there perhaps I would manage to have a look.

But for me "inconsistent inital initial conditions" is rather related to BC's (boundary conditions) or multiphysics interchange than meshing, as you have several physics, have you checked the Solver Manager, and solved one by one (or in statics) to identify better what COMSOL is not happy about.

But as you are in the time domain you might have time dependent valurables too, I often add a
cte*(t==0)+(t>=0)*myfunction
to be able to flip between static and time dependent BC without retouching them


Also for my explanations, I try to adapt to the level of the questions, as there are newbeginners and very senior persons coming with many different questions here. It's difficult to know and get it right.

For me, I use this Forum, as training on how to use COMSOL better, I get quite a lot out of studying the questions and answers (inbetween all my other occupations). And the complexity of a model is very realtive. What have presented a few times, as "simple" models wtih COMSOL (compared to some we have been using with older FEM software), to the local COMSOl support staff, was often considered as "complex" w.r.t. what most users send them.

And I beleive that most industrial users will not dare to show on an open community like here what they are doing. I'm lucky having a mix of some rather public and others very confidential developments to do.

Back in a few days
Ivar
Hi Well I'm on travel so I do not have access to COMSOL so it's difficult for me to answer further just now, later this week I'm in Milano to listen to the COMSOL conference, there perhaps I would manage to have a look. But for me "inconsistent inital initial conditions" is rather related to BC's (boundary conditions) or multiphysics interchange than meshing, as you have several physics, have you checked the Solver Manager, and solved one by one (or in statics) to identify better what COMSOL is not happy about. But as you are in the time domain you might have time dependent valurables too, I often add a cte*(t==0)+(t>=0)*myfunction to be able to flip between static and time dependent BC without retouching them Also for my explanations, I try to adapt to the level of the questions, as there are newbeginners and very senior persons coming with many different questions here. It's difficult to know and get it right. For me, I use this Forum, as training on how to use COMSOL better, I get quite a lot out of studying the questions and answers (inbetween all my other occupations). And the complexity of a model is very realtive. What have presented a few times, as "simple" models wtih COMSOL (compared to some we have been using with older FEM software), to the local COMSOl support staff, was often considered as "complex" w.r.t. what most users send them. And I beleive that most industrial users will not dare to show on an open community like here what they are doing. I'm lucky having a mix of some rather public and others very confidential developments to do. Back in a few days Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29.08.2011, 03:17 GMT-4
Hi Ivar!


I was a little confusing with your word:" I often add a cte*(t==0)+(t>=0)*myfunction". Did you say that if I set the Fz as '-Bx^2/(2*u0)' , but I can't get the initial value, and the error is :
"Failed to find consistent initial values.
Last time step is not converged."
Then I can try set the Fz as 'cte*(t==0)+(t>=0)*Bx^2/(2*u0)'?

And what does the "cte" mean? Does it mean a consant value(no matter what value, for example I can insert '50*(t==0)+(t>=0)*Bx^2/(2*u0' ) or a expression like this 'cte*(t==0)+(t>=0)*Bx^2/(2*u0)'?

Thank you in anvance!

And best wishes!

yajuan
Hi Ivar! I was a little confusing with your word:" I often add a cte*(t==0)+(t>=0)*myfunction". Did you say that if I set the Fz as '-Bx^2/(2*u0)' , but I can't get the initial value, and the error is : "Failed to find consistent initial values. Last time step is not converged." Then I can try set the Fz as 'cte*(t==0)+(t>=0)*Bx^2/(2*u0)'? And what does the "cte" mean? Does it mean a consant value(no matter what value, for example I can insert '50*(t==0)+(t>=0)*Bx^2/(2*u0' ) or a expression like this 'cte*(t==0)+(t>=0)*Bx^2/(2*u0)'? Thank you in anvance! And best wishes! yajuan

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29.08.2011, 04:44 GMT-4
Hi Ivar!

I am sorry to bother you!
And I have another question. It is about "cte*(t==0)+(t>=0)*myfunction". For example, I set Fx=500, but the value 500 works only t>0, when t==0 ,Fx also keeps zero? And "Fx=500*(t==0)+500*(t>=0)"means "t==0,Fx==1000" or "t==0, Fx==500"? If I want Fx always keeps at 500 (contains t==0), should I take "Fx=500*(t==0)+500*(t>=0)" or "Fx=500*(t==0)+500*(t>0)"?

Thank you in advance !

Best wishes!

Yajuan
Hi Ivar! I am sorry to bother you! And I have another question. It is about "cte*(t==0)+(t>=0)*myfunction". For example, I set Fx=500, but the value 500 works only t>0, when t==0 ,Fx also keeps zero? And "Fx=500*(t==0)+500*(t>=0)"means "t==0,Fx==1000" or "t==0, Fx==500"? If I want Fx always keeps at 500 (contains t==0), should I take "Fx=500*(t==0)+500*(t>=0)" or "Fx=500*(t==0)+500*(t>0)"? Thank you in advance ! Best wishes! Yajuan

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.