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

How to set sinusoidal electric current for volume of electrodes in Fluent?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 27, 2017, 07:26
Question How to set sinusoidal electric current for volume of electrodes in Fluent?
  #1
Member
 
Join Date: Mar 2009
Location: Vietnam
Posts: 36
Rep Power: 18
ngoctm is on a distinguished road
Hello everyone,

I want to assign the sinusoidal current for volume of electrodes for representing the three-phase AC supply to the electrodes. The current inputs, were specified as equal in magnitude but with a phase lag of 120^{o}.

i=Im.sin(2\pi.f.t+\phi)/V_{electrode}

Could you help me to setup this input.

Thank you in advance.
NgocTM
ngoctm is offline   Reply With Quote

Old   April 4, 2017, 01:42
Default
  #2
Member
 
Join Date: Mar 2009
Location: Vietnam
Posts: 36
Rep Power: 18
ngoctm is on a distinguished road
Hello Everyone,

I have received an advice to set up this function. But I don't know which is the correct syntax for sin function between 2 functions below:

#include "udf.h"
#define FREQ 50 /*Hz*/
#define PI 3.1415
DEFINE_SOURCE(j_source,c,ct,ds,eqn)
{
real CURR = 1200.0;
real VOLTA = 180.0;
real VOLUM = 0.002157;
real source1;
source1 = VOLTA*CURR/VOLUM*sin((2.0*PI*FREQ*CURRENT_TIME+90.0)*PI/180.0);
ds[eqn] = 0.0;
return source1;
}

Or

#include "udf.h"
#define FREQ 50 /*Hz*/
#define PI 3.1415
DEFINE_SOURCE(j_source,c,ct,ds,eqn)
{
real CURR = 1200.0;
real VOLTA = 180.0;
real VOLUM = 0.002157;
real source1;
source1 = VOLTA*CURR/VOLUM*sin(2.0*PI*FREQ*CURRENT_TIME+90.0*PI/180.0);
ds[eqn] = 0.0;
return source1;
}

Could you please give me some advice?

Thank you in advance!

NgocTM

Last edited by ngoctm; April 4, 2017 at 03:50.
ngoctm is offline   Reply With Quote

Old   August 7, 2017, 16:59
Default
  #3
New Member
 
Aureliano Sancho
Join Date: May 2013
Location: Salvador-Ba-Brasil
Posts: 26
Rep Power: 13
SanchoBuendia is on a distinguished road
Hi, I'm trying to build a model, rectangular channel with cathode on the inside and anode on the outside, but I don't know how more that. Could you help me?
SanchoBuendia is offline   Reply With Quote

Old   August 1, 2022, 09:54
Default
  #4
Member
 
sina
Join Date: Nov 2021
Posts: 41
Rep Power: 5
sina_sls is on a distinguished road
Quote:
Originally Posted by ngoctm View Post
Hello everyone,

I want to assign the sinusoidal current for volume of electrodes for representing the three-phase AC supply to the electrodes. The current inputs, were specified as equal in magnitude but with a phase lag of 120^{o}.

i=Im.sin(2\pi.f.t+\phi)/V_{electrode}

Could you help me to setup this input.

Thank you in advance.
NgocTM
Hello

I want to set sinusoidal value of electric potential (MHD module) for a wall, first i try expression but i faced to error :

Error: wta(2nd) to string_eq

Error Object: __expr__

then i try Profile and UDF profile , but agian i faced to problem , when i use them it consider the wall to insulated.

Could you help me how can i set sinusoidal value for current density ( Electric Potential MHD) ?

Best Regards,
sina_sls is offline   Reply With Quote

Old   August 2, 2022, 02:40
Default
  #5
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
show your code, show compilation log, explain the error in details
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   August 2, 2022, 03:14
Default
  #6
Member
 
sina
Join Date: Nov 2021
Posts: 41
Rep Power: 5
sina_sls is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
show your code, show compilation log, explain the error in details
Thank you for your response,

this is my UDF profile code that when i select it for a wall , MHD module consider the wall as insulated:

#include "udf.h"
#define PI 3.141592654

DEFINE_PROFILE(current_density,thread,position)
{

face_t f;
real t = CURRENT_TIME;

begin_f_loop(f,thread)
{

F_PROFILE(f,thread,position)=13*sin((2*PI/0.04)*t);

end_f_loop(f,thread)
}
}

This is expression :

13*sin((2*PI/0.04[s])*Time)

when i use it and then go to MHD module Box it show this error :


Error: wta(2nd) to string_eq
Error Object: __expr__

and fluent didn't run and show this :
======Message from the Cortex Process========

Compute processes interrupted. Processing can be resumed.

===================================
sina_sls is offline   Reply With Quote

Old   April 14, 2023, 11:46
Default
  #7
New Member
 
Bulgaria
Join Date: Mar 2021
Posts: 7
Rep Power: 5
Niicho is on a distinguished road
Hello sina_sls,

Did you manage to solve your problem? I am experiencing a similliar issue! thank you in advance!

Last edited by Niicho; April 14, 2023 at 13:10.
Niicho is offline   Reply With Quote

Reply

Tags
ac electrical current, electrodes, mhd


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
[ICEM] ICEM Scripting Issues tylerplowright ANSYS Meshing & Geometry 33 September 27, 2021 17:35
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 14:41
The fluent stopped and errors with "Emergency: received SIGHUP signal" yuyuxuan FLUENT 0 December 3, 2013 23:56
[snappyHexMesh] determining displacement for added points CFDnewbie147 OpenFOAM Meshing & Mesh Conversion 1 October 22, 2013 10:53
how to set such B.C. in Fluent? Sherri FLUENT 1 January 12, 2006 13:32


All times are GMT -4. The time now is 16:18.