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.

continuous magnetic separation model

Please login with a confirmed email address before reporting spam

I am modeling a continuous magnetic separator. As it can be seen from the model attached, I have five magnetizable wires that get magnetized by the magnetic field boundary conditions applied to the boundaries of the surrounding domain.
I have applied a square wave function for the magnetic field boundary condition to simulate magnet on-off situation. The Nernst Planck equation calculates the concentration profiles for particles moving under the influence of convection, diffusion and magnetic force (represented here as voltage).

I solve for magnetic field first. Save the results and then follow it with solving the nernst planck and navier stokes equation simultaneously (since I have expressed viscosity as a function of concentration).

I had a couple of strange results and was hoping for your help on it.

1. The square function applied resulted in not a smooth square magnetic field function but rather a sinusoidal increasing and decreasing magnetic field, followed by zero field for a period

Is the boundary conditions inputted wrong?

2. After solving the navier stokes/nernst planck equations, magnetic field was observed again as a function of time. It now showed a constant magnetic field and not the square function that was inputted (or the sinusoidal function that was observed).

Why does this happen?

3. Magnetic field of the wires should attract the particles while the flow pushes it through the outlet. Given that the on-off magnetic field was applied, it is natural to expect a greater concentration of particles exiting boundary 15 compared to 14. However, boundary integration yields the almost same concentration/flux for the two boundaries.

Why is that so?


Any help on this will be appreciated.
-Asha


8 Replies Last Post Apr 8, 2013, 1:27 a.m. EDT
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 Feb 1, 2011, 3:57 p.m. EST
Hi

you have amny questions there, andI cannot amange to answer all, but I hope other can also help.
One thing though (even before I can open the model) if you say you have "square" pulses, do not forget that dirac steps are not well modelled, you need to "smoothen" them the solver is based on estimation of the next calue based on gradient (derivative) estimations. These cannot be performed correctly with "square" step functions.
You should use the Heavisie functions see th doc (these are auomatically included in the v4 "step" & ramp operators).
Then you must note that the sover by default is using "automatical" stepping spesialised for diffusion type solutions. when you apply pulses or periodic functions yu must use the "strict" or intermediate" solver time stepping settings, and ensure that your time range is sufficiety dense to resolve correctly theperiodes, incuding a few step during the rise nd fall times of your "pulses"

And do neither not forget that if you are pulsing a current via a voltage you might have inductive effects appearing, that will deform your expected current pulses (all depends how you have set up your model.

--
Good luck
Ivar
Hi you have amny questions there, andI cannot amange to answer all, but I hope other can also help. One thing though (even before I can open the model) if you say you have "square" pulses, do not forget that dirac steps are not well modelled, you need to "smoothen" them the solver is based on estimation of the next calue based on gradient (derivative) estimations. These cannot be performed correctly with "square" step functions. You should use the Heavisie functions see th doc (these are auomatically included in the v4 "step" & ramp operators). Then you must note that the sover by default is using "automatical" stepping spesialised for diffusion type solutions. when you apply pulses or periodic functions yu must use the "strict" or intermediate" solver time stepping settings, and ensure that your time range is sufficiety dense to resolve correctly theperiodes, incuding a few step during the rise nd fall times of your "pulses" And do neither not forget that if you are pulsing a current via a voltage you might have inductive effects appearing, that will deform your expected current pulses (all depends how you have set up your model. -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 1, 2011, 6:23 p.m. EST
Thanks Ivar. I did use heaviside function "flc2hs" to model a square pulse train and the model does not involve current, so that should not be the problem.
Is there a way by which we can set up intermediate step solving rather than the default setting?
Thanks Ivar. I did use heaviside function "flc2hs" to model a square pulse train and the model does not involve current, so that should not be the problem. Is there a way by which we can set up intermediate step solving rather than the default setting?

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 Feb 2, 2011, 1:11 a.m. EST
Hi

in that case you should look over the solver step settings, normally you should see an automatic, strict and intermediate in the pull down list. Choose intermediate for periodic or pulsing systems, and ensure that your "range" or time step list is sufficiently fine to have a minimum of 3-5 points per period or rise/fall time. the time stepping you define does not need to be regular, only monotonically increasing (or decreasing)

--
Good luck
Ivar
Hi in that case you should look over the solver step settings, normally you should see an automatic, strict and intermediate in the pull down list. Choose intermediate for periodic or pulsing systems, and ensure that your "range" or time step list is sufficiently fine to have a minimum of 3-5 points per period or rise/fall time. the time stepping you define does not need to be regular, only monotonically increasing (or decreasing) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 3, 2011, 12:14 p.m. EST
Hi Ivar,

Given that version 4 handles the square pulse train better than 3.5, I modeled the same in COMSOL 4 (please see attached).

I used magnetic field no currents module to generate "square pulse train" magnetic field boundaries which magnetize the wires present inside them.

I have coupled this to Laminar flow and convective diffusive with migration modules. However when I run these two in series I get an error:

"Failed to find consistent values.
Singular Matrix"

Is this because the two study steps are not linked or is it not solving the pulsing magnetic field?

Please help!

Asha
Hi Ivar, Given that version 4 handles the square pulse train better than 3.5, I modeled the same in COMSOL 4 (please see attached). I used magnetic field no currents module to generate "square pulse train" magnetic field boundaries which magnetize the wires present inside them. I have coupled this to Laminar flow and convective diffusive with migration modules. However when I run these two in series I get an error: "Failed to find consistent values. Singular Matrix" Is this because the two study steps are not linked or is it not solving the pulsing magnetic field? Please help! Asha


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 Feb 3, 2011, 1:59 p.m. EST
Hi

singular matrix normally means not enough BC's to make an unique solution.
I'm curently on a travel for a few days, and no COMSOL with me ;) so I have no chance to check anything for some time

--
Good luck
Ivar
Hi singular matrix normally means not enough BC's to make an unique solution. I'm curently on a travel for a few days, and no COMSOL with me ;) so I have no chance to check anything for some time -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 3, 2011, 2:11 p.m. EST
I there anyone else who can help?
I there anyone else who can help?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 20, 2011, 2:05 p.m. EDT
Hi,

I tried to use the suggestion given by you on the blog and also tried to implement different suggestions on the Comsol Forum , but I havenot achieved desired result.

My Objective: Pulse width = 0.5ms, frequency = 10Hz, period = 1/frequency = 0.1s. Heating for 1sec and cooling for 5 sec.

Baed on suggestion, pulseON=(mod(t,pulse_period)<=pulse_width), which is writen in my model as follows

Heat flux = avg_pd_new1 = avg_pd*(mod(t,0.1)<=5e-4)

My problem is : Even if I get the plot of pulse train of frequecy 10Hz and pulse width 0.5 ms, which I can plot on analytic function (an1), but my output remains ON only for the first pulse and rest is OFF.

Also, I did tried several other suggestion, which is plot in analytic function as an2,an3

Please suggest me some solution. I am attaching my model for reference.

Regards,
Hitesh

Hi, I tried to use the suggestion given by you on the blog and also tried to implement different suggestions on the Comsol Forum , but I havenot achieved desired result. My Objective: Pulse width = 0.5ms, frequency = 10Hz, period = 1/frequency = 0.1s. Heating for 1sec and cooling for 5 sec. Baed on suggestion, pulseON=(mod(t,pulse_period)


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 8, 2013, 1:27 a.m. EDT

Hi

in that case you should look over the solver step settings, normally you should see an automatic, strict and intermediate in the pull down list. Choose intermediate for periodic or pulsing systems, and ensure that your "range" or time step list is sufficiently fine to have a minimum of 3-5 points per period or rise/fall time. the time stepping you define does not need to be regular, only monotonically increasing (or decreasing)

--
Good luck
Ivar


HI Ivar,
I am trying to implement a pulse on my inlet (C=0 for t < t1 and C=Co for t1<t<t2 and then this continues). I have changed my time stepping settings from "free" to "intermediate".But I could not go beyond one pulse. The solution did not converge and achieved singularity at the end of the first pulse duration. So, as suggested in the thread below I have moved to "Manual Generalized alpha" time stepping scheme. Now I am getting as many number of pulses I want but I am little circumspect regarding the accuracy of the solution. I am trying to use very small time steps in my problem. I am not sure why " BDF>Intermediate" Solver setting did not work in my case. Do you have any additional tips for problems involving pulsing BCs ?

www.comsol.com/community/forums/general/thread/20971/

Regards,
Sanket
[QUOTE] Hi in that case you should look over the solver step settings, normally you should see an automatic, strict and intermediate in the pull down list. Choose intermediate for periodic or pulsing systems, and ensure that your "range" or time step list is sufficiently fine to have a minimum of 3-5 points per period or rise/fall time. the time stepping you define does not need to be regular, only monotonically increasing (or decreasing) -- Good luck Ivar [/QUOTE] HI Ivar, I am trying to implement a pulse on my inlet (C=0 for t < t1 and C=Co for t1

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.