CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS

Nanomagnetic flow in flexible tube, MHD and FSI in Ansys

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 12, 2023, 11:24
Default Nanomagnetic flow in flexible tube, MHD and FSI in Ansys
  #1
New Member
 
nguyen Kien
Join Date: Feb 2023
Posts: 4
Rep Power: 3
kien is on a distinguished road
Hi all,

I am trying to simulate the nanomagnetic fluid flowing in a flexible tube using Ansys Fluent combine with a Two-way FSI model,

However, I have a problem when I create an applied magnetic field. I use MDH to add the magnetic field in B_y (0.03 tesla). when I run the system coupling, the FSI works well but there is no applied field in Fluent even though I set the apply field after the initialization step. Ansys may set the applied field to 0 before running.

Now I am trying with UDF code but the system coupling warned error

here is my code below

#include "udf.h"

DEFINE_SOURCE(magnetic_field, c, t, dS, eqn)
{
real x[ND_ND], y[ND_ND], z[ND_ND];
real Bx, By, Bz;
real source[ND_ND];

/* Define the magnetic field values */
Bx = 0.0;
By = 0.03;
Bz = 0.0;

/* Get the cell center coordinates */
C_CENTROID(x, c, t);

/* Calculate the momentum source */
source[0] = 0.0;
source[1] = -dS[0]*By;
source[2] = 0.0;

/* Add the source to the momentum equation */
dS[eqn] = source[eqn];

return dS[eqn];
}

Do you have another way to solve this problem,

Thank you
kien is offline   Reply With Quote

Reply


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
Looking for a CFD Multiphysics Expert In Comsol or Ansys Fluent tausifultimate CFD Freelancers 4 July 11, 2023 12:13


All times are GMT -4. The time now is 23:48.