Mesh displacement based on force calculations in magnetic fields

Please login with a confirmed email address before reporting spam

Hello Comsol community,

I am a EE student and we use Comsol as a tool in our numerical field computation class.

For exam preparation, I want to simulate the (linear) acceleration of a ferromagnetic particle in a coilgun. So far, I am only considering one stage.

I use "Magnetic Fields" for calculating the field and force values and a moving mesh to model the missile movements. To test the setup, I modeled the mesh displacement at first constant as , whereas velocity0 is an arbitrary constant (for now, later it shall represent the velocity after leaving the previous stage). Then I did the force calculation and I got reasonable results, see first plot.

Now, I want to work on the the actual task, which is calculating the mesh displacement based on the initial values of position and velocity and the applied forces. The ODE setup is attached. This is where trouble comes into play. At first, I directly assigned the ODE variable "positionMissile" to the mesh displacement variable. I used a state variable as a buffer, so at least in theory, all values for calculating the next position should be known. However, Comsol fails to find initial values. Next, I set the initial values in the solver configuration to "zero solution". Then the simulation at least starts, but crashes after some time. Also, I think this does not handle the initial velocity correctly since nothing is moving at all. As a last idea, I wanted to model the mesh displacement calculation in a crude manner as to get at least a rough solution. This time, Comsol denied the calculation due to the cyclic dependency (which is the actual task, lol ^^).

Any help is appreciated! I also hook my current Comsol file on to this post, hoping that someone has an idea I could follow - Thanks in advance!

Best, Manuel



Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.