|
[Sponsors] |
How to pass electric current magnitude to UDF |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 6, 2018, 15:14 |
How to pass electric current magnitude to UDF
|
#1 |
New Member
Paul Lee
Join Date: Jun 2018
Location: Vancouver
Posts: 14
Rep Power: 7 |
I'm looking at a galvanic corrosion damage problem using fluent electric potential model and are writing a udf with DEFINE_GRID_MOTION to update the dynamic damage of metal surface. The equation looks like this:
corr_rate = (J*MWT)/(z*F*RHO) y(1)=y(0)+corr_rate*dt where corr_rate is surface damage in m/s J is electric current magnitude in A/m^2, a post processing variable MWT is molecular weight of metal in g/mol z is charge number of dissolved metal ion F is Faraday's constant in C/mol RHO is density of metal in g/m^3 problem is I don't know how to pass electric current J into the UDF. I've looked through the UDF manual and while I can call cell variable like pressure and temperature with C_P(c,t) and C_T(c,t), there is no similar macro for electric current. Can someone help me? Thanks in advance! |
|
July 17, 2018, 15:19 |
update
|
#2 |
New Member
Paul Lee
Join Date: Jun 2018
Location: Vancouver
Posts: 14
Rep Power: 7 |
A little update, I was able to deform mesh with hard entered constant current density J. see attached UDF, which is hooked to dynamic mesh zone.
my problem lies in how and if I can pass the post processing variable current density into UDF. 2018-07-17_12-15-20.png 2018-07-17_12-14-20.png corrosion_al.c |
|
October 16, 2019, 07:11 |
|
#3 |
New Member
Domagoj
Join Date: Oct 2019
Posts: 10
Rep Power: 6 |
Hello, did you managed to pass electric current J into the UDF?
How did You do it? Thanks! |
|
October 16, 2019, 12:47 |
|
#4 |
New Member
Paul Lee
Join Date: Jun 2018
Location: Vancouver
Posts: 14
Rep Power: 7 |
||
October 17, 2019, 01:37 |
|
#5 |
New Member
Domagoj
Join Date: Oct 2019
Posts: 10
Rep Power: 6 |
||
June 14, 2022, 07:10 |
|
#6 | |
New Member
Join Date: Jul 2021
Posts: 1
Rep Power: 0 |
Quote:
Has anyone used those commands succesfully? I am stucked with SIGSEGV errors while trying to obtain the electric potential gradient... Best regards |
||
June 15, 2022, 04:13 |
|
#7 | |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Quote:
describe case, model you are using, show code and compilation log list of avaliable macros for specific models you may find in Code:
..\fluent\fluent_xxx\addons\model_name\src
__________________
best regards ****************************** press LIKE if this message was helpful |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to set sinusoidal electric current for volume of electrodes in Fluent? | ngoctm | FLUENT | 6 | April 14, 2023 10:46 |
UDF for current density in PEM fuel cell | sajjad haider | FLUENT | 2 | February 22, 2012 18:16 |
I need UDF help. | S.Whitney | FLUENT | 0 | October 15, 2007 11:29 |
DEFINE_DPM_OUTPUT macro UDF HELP | Puneet | FLUENT | 3 | November 28, 2003 10:55 |
How can I get the particle current position in UDF | cfdfans | FLUENT | 4 | April 2, 2001 05:03 |