CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Coupling magnetostatics to interMixingFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 27, 2019, 03:12
Default Coupling magnetostatics to interMixingFoam
  #1
New Member
 
Chan Kwok Hoe
Join Date: Sep 2019
Posts: 3
Rep Power: 5
kage is on a distinguished road
Dear All,

I'm trying to model the aggregation and separation of magnetic nanoparticles in a sessile ferrofluid droplet.

I'm wondering if this could be done using interMixingFoam, where the 3rd phase is the miscible phase of magnetic nanoparticles in water.

I've tried setting up interMixingFoam and was getting good results up to coupling the magnetostatics into the fluid flow.

Basing off from magneticFoam, I've copied pretty much most of the code into interMixingFoam solver.

This was what I did:
1) merging the createFields.H
- copying the psi, B, H and HdotGradH field, murf and Mrf field
- reading the constant/transportProperties for the magnets into the new createFields.H
2) merging the magneticFoam with interMixingFoam. Since field was created in the createFields.H, this were the only other lines that I moved over, changing simple.correctNonOrthogonal() to pimple.correctNonOrthogonal(), as follows
- // Solving for magnetic field
while (pimple.correctNonOrthogonal())
{
solve(fvm::laplacian(murf, psi) + fvc::div(murf*Mrf));
}
H = fvc::reconstruct(fvc::snGrad(psi)*mesh.magSf());
HdotGradH = H & fvc::grad(H);
B = constant::electromagnetic::mu0*fvc::reconstruct(mu rf*fvc::snGrad(psi)*mesh.magSf() + murf*Mrf);

I was able to specify the magnetic properties (relative permeability) of the three phases involved by adding additional functions in the incompressibleThreePhaseMixture header and C++ files.

I was also able to set up the magnet in the simulation and obtain the B, H and HdotGradH fields for every time step. But the fields were constant and did not change. It seems that the murf for the system was not updated. So I proceeded to update it to read off the new murf after the droplet have moved. There seems to be some response to the B and H field now.

I tried updating the Mrf using the formula M = chi*H, where chi is the magnetic susceptibility = relative permeability - 1.

This is where I was stuck. How do I multiply a surfaceScalarField chi to a volVectorField?

I know that there is still the component of the magnetic force that I need to add in the momentum equation the Kelvin force. I have yet done so, as I wanted to make sure that the fields are properly set up before doing so.

Regards,
Kwok Hoe
kage is offline   Reply With Quote

Reply

Tags
intermixingfoam, magnetostatics

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FSI problem with system coupling: Fail to couple FLUENT sophieUNSW FLUENT 16 October 1, 2020 06:20
2-Way FSI Coupling Error (Oscillating Plate Tutorial) EmiS ANSYS 2 June 29, 2018 10:09
Difference between stagger/coupling iteration and coupling step Jiricbeng CFX 1 September 13, 2016 03:37
Coupling time duration, Coupling time steps Jiricbeng CFX 0 April 29, 2015 09:37
one/two way coupling of DPM Angela FLUENT 3 April 28, 2008 10:29


All times are GMT -4. The time now is 12:44.