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.
Increasing Current prevents model from solving
Posted 27 oct. 2011, 10:21 UTC−4 Low-Frequency Electromagnetics, Heat Transfer & Phase Change, Studies & Solvers Version 4.2a 14 Replies
Please login with a confirmed email address before reporting spam
The attached model is one of the test models I have created to look at the Joule Heating model. It has a coil, which has constant current density on it, and I want to see the
I have two questions about the file:
Firstly, when I run the model, it sometimes solves and sometimes doesn't. It seems random - but sometimes it solves and gives me a plot where in all times, the whole model is in the same temperature for some reason; and sometimes it just doesn't solve - it gets stuck in a specific place while computing: in the progress bar you can see two rows - one is Time Dependent Solver (BDF), 0% progress, time parameter stuck on 0; the second row is Non-linear solver, 0% progress, step parameter stuck on value 1. it is just stuck like that, the only thing that seems to work is canceling the computation.
The next question is wierd just as well - if I increase the current density above 1 A/m^2, it *always* gets stuck, and never solves(even the wrong solution given at first is not given).
note that it does not give me any error messages.
Thank you for your attention,
Shoval
Attachments:
Please login with a confirmed email address before reporting spam
I'm not sure why, I cannot fget it to run either, even if I reset the solver. So I would suggest remake your mode from scratch, it's quickly done, your file must heve got corrupted.
And I would expect some effects if you ramp up your current to the 1 to 10 [A/mm^2], and not at the low values you are using
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
It seems that the file indeed got corrupted somhow, I think. In another file which seems perfectly identical to this one, the computation worked(I increased the current as you suggested, by the way).
In these results, however, there seems to be something wrong. I attacked a GIF file to show you the result - it looks like a heat diffusion from certain places on the coil, and clearly it shouldn't be that way, since the problem is totally symmetrical. The only thing I could think of that isn't symmetric is the mesh - perhaps refining the mesh would help?
Thanks,
Shoval
Attachments:
Please login with a confirmed email address before reporting spam
Nagi Elabbasi
Veryst Engineering
Please login with a confirmed email address before reporting spam
and check your values with a quick hand calculation:
You have a loop length of some pi*(0.6[m]+0.7[m])/2, a section of 0.1[m]*0.05[m], a current density of 1000[A/m^2] and a constant copper resisitivity of 1.72e-8[ohm*m]. So I get only some E-8 W dissipation, that should not heat a lot such a large copper block ! (or did I get something wrong?)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Firstly I shall answer Ivar - the model above, in the first post, is outdated; the values of the model do have an effect and it is alright, so that is probably not the cause for a problem. I attached the model as it is now, with the results opened. note that the physics, the mesh and the time dependent nodes are the one I'm dealing with.
Secondly, I shall answer Nagi:
I defined the current as external current density alone. I saw no other way to have the current in this physics in a closed loop; note that if I have a loop that is not 360 degrees, I can use ground and terminal to define the current, and the model works perfectly. So since I want to deal with coils that form full loops, I want to treat them as one closed loop, where the magnetic field is just multiplied by N, the number of loops. So in this test run of Joule heating(no mention of magnetic field yet), is there any other way to define it without splitting the ring? I did not understand what you meant in the last sentence - "redefine the heat generation equation internally to J.J/sigma.".
If we're looking at the equations, E=-grad(V), so if we don't have potential there should be no electric field at all; however,
J=sigma*E+d/dt(D)+Je=0+0+Je, which is what I expected and wanted, basically. this forms nabla . J = Qj, so that the heat generation does seem okay, the way I see it. Correct me if I'm wrong of course :)
In general I faced the problem of how to apply a well-working current in a closed loop more than once while I worked in comsol, so perhaps you can enlighten me now in this matter, it'll be great.
Once again thanks for your time;
Shoval
Attachments:
Please login with a confirmed email address before reporting spam
you have defined conduction in air too, that is not really physical. I would propose that you add a "heat conduction in solid-fluid" node for the "air" and set one of the boundaries to a "constant temperature" to have a minimum stable boundary
then your mesh is far too coarse for the case, try a denser mesh, i.e. normal, then I believe your results will show up more as you expect them.
then start your current with a step functin, i.e. 1 sec rise time, and give a few dense steps at the beginning for the solver, i.e. { 0.1 0.5 1 5 range(20,20,360)}
still something is wrong in here, I wounder if you should not restart, sometimes the file get corrupted ? Anyhow I have only 4.2a on my laptop these days
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
about the mesh, it's just leftover from some test, Normal is what I use..
about the current - why should I use a step function? for now I assumed constant current is okay. about the corruption of files - do you know what can cause files to get corrupted?
Thanks for the answers,
Shoval
Please login with a confirmed email address before reporting spam
Div(j) = Qj does not refer to the heat generation, it refers to the rate of change of charge density (or current density). The heat generated is calculated as Jh.Qrh = J.E. That’s the equation that you need to change. I am curious to know if that change works, because I still personally prefer splitting the ring as you described!
Nagi Elabbasi
Veryst Engineering
Please login with a confirmed email address before reporting spam
when you couple multiple physics, the default "0" initial conditions are often a rather poor or even unphysical starting point, which gives quite some trouble for the solver to get on, or even avoids convergence. But sometimes (often for verxy simple models) COMSOL gets around anyhow.
Mostly you gain quite some time to set up realistic initial conditions, or you start with a consistent state i.e. no current that you switch on during the first time steps, then the sovler can matdh heat generation and current and ...
Indeed in MEF you need to put some conduction in the air to avoid impossible numerical scaling issues, do not forget that even double precision floating point numbers are a rather "poor" representation of the Real "R" set of numbers, scaling differences above 1:1E6 result mostly into numerical noise integration
File corruption have happened sometimes to me, it seems (but only a feeling) it can happen if I'm very quick to update in several palces up and down in a complex model node tree. Sometimes I can recover by clearing solution, mesh, reset model and then systematically clicking slowly node by node from top to bottom, but often I redo my model from scratch, when I have finished testing out the optimum settings
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Div(j) = Qj does not refer to the heat generation, it refers to the rate of change of charge density (or current density). The heat generated is calculated as Jh.Qrh = J.E. That’s the equation that you need to change. I am curious to know if that change works, because I still personally prefer splitting the ring as you described!
Where am I supposed to change this equation? I clicked the show node at the upper part of the bar where it says Model Builder, and selected the Equation View. Then the equation view nodes in all physics nodes appeared; so I chose the Joule Heating one to see if there is anything similar to waht you said that I should change - but there appear to be quite a lot of equations there. in the Jh.Qrh the expression is jh.Jx*E1+jh.Jy*E2+jh.Jz*E3 . assuming that E1,2,3 corresponds to the Jx,y,z, isn't this the same equation as you suggested?
...either way, I doubt this is the cause for the problem. once again, I see no reason for the program, even in this form, to give me a non-symmetrical solution.
According to your advice, I figured it can't do any harm to rebuild the model, so I have, and I created once again the GIF file of the results - a horizontal slice(temperature), from time 0 to 1000(attached). here too, there seem to be two spots that look like their initial temperature was different.
I will try what you said with the step-function in the current in a few hours, but till then, thank you both very much for your time investment here! :)
~Shoval
Attachments:
Please login with a confirmed email address before reporting spam
I attached the model as it is now, perhaps you can see why it is wrong. I noticed that you said earlier that you're using 4.2a - maybe it makes a difference - I'm using 4.2.
I also noticed that the current results, has at times areas with temperature lower than 293.15, the default for all the domains. clearly something is wrong. I cleared solutions to minimize file size - computation should take around 90 seconds.
thanks again,
Shoval
Attachments:
Please login with a confirmed email address before reporting spam
~Shoval
Please login with a confirmed email address before reporting spam
In time dependent solving of thermal models of solids, if you get negative temperatures (or lower than the minimal ones) with only positive heat influx, it often indicates that you are not respecting the mesh size and time stepping correctly to resolve the thermal gradients you have.
There are two time constants in thermal one must whatch (often linked to the BIOT number for solids), particularly in time dependent solving:
1) the heat capacity time tc = rho*Cp*Vol/(h*Surface) where rho is the density [kg/m^3], Cp the heat capacity [J/kg/K], Vol is the domain volume [m^3] and S the surface [m^2], while h is the heat exchange parameter [W/m^2/K]. This is typically the thermal inertia of the domain.
2) But there is also the heat diffusivity alpha = k/rho/Cp where k is the heat conduction [W/m/K] and alpha has the dimensions of [m^2/s]. The corresponding diffusion time constant is td=L^2/alpha, where L in [m] is the caracteristic length considered (mesh size, or layer thickness or ...) y the way "ht.k" is no longer defined as a scalar in V4.2a (perhaps not in earlier versions either) one can use ht.kxx instead, the first diagonal heat conduction tensor element, (but do not get confused with the COMSOL "xx" tensor suffix notation, and the dependent variable "xx" suffix for second derivative along x, the first spatial direction ;)
if you select L to the average mesh size ("h" [m] in COMSOL not to be confused with the heat exchange "h" [W/m^2/K] used above) then it gives you a time value td you should ensure you respect in your time stepping. There is a simple model where I illustrate this in another thread (a few days ago)
Mostly, in our macroscopic world, the scaling of these time values do not give us issues with too short time stepping, or not fine enough mesh. So often one get good results without checking the td & tc.
But for i.e. MEMS devices: the different scaling of these time constants td & tc, as well as the fact that MEMS is often a set of metal and oxyde thin layers with very different alpha's, this can easily give you quite surprising results => numerical instabilities, temperature oscillating "waves", negative temperatures ... if one does not carefully check the meshing and the transient solver stepping settings.
Basically, there is no real difference here in HT, than with the fact that for RF, to resolve the electric field of a travelling wave, one need typically five 2nd order mesh elements per wavelength (in the material).
For all FEM models one need to have a mesh density that solves correctly the gradient of the fluxes, to get correct results, this applies to ALL physics
There are more on these values in good books on thermal flux transfer, just take a look at your local library.
Also thanks to Nagi, having stressed, here on the forum, already several times, the importance of respecting correctly the relations between mesh density and minimum time stepping. I have not found much on this subject in the COMSOL HT documentation, I hope they will take the hint for next release ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I am once again here for the same problem, but in a different version and model. The problem now exists in my main model - it is huge and cannot be uploaded here(over 200 MB with results). I have three coils there, two are AC and one is DC, and they all have the same max amplitude. The amplitude is defined as a paramater J0, and for some reason, when J0=100 things work perfectly - the model solves in around 2 hours and gives me good results. However, for J0=1000 it takes about 4 days to solve, and for higher than that it doesn't move for a whole week.
What could be causing the problem? I have one guess but it is highly unlikely in my opinion - the model uses an HB curve to describe one of the materials and there might be a difference between the physics in lower and higher currents due to the saturation - but still, such major differences is not something I would expect.
Thanks,
Shoval
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.
Suggested Content
- KNOWLEDGE BASE Understanding the Fully Coupled vs. Segregated approach and Direct vs. Iterative Linear Solvers
- FORUM Increasing Precision of Eigenfrequency Analysis
- BLOG Hydrodynamic Thermal Transport in the Kinetic-Collective Model
- KNOWLEDGE BASE Improving Convergence of Transient Models
- BLOG Examining an Air Filter with a RANS Turbulence Model