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

Electrical conductivity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2016, 17:44
Default Electrical conductivity
  #1
New Member
 
walied
Join Date: Aug 2014
Posts: 16
Rep Power: 11
walied123 is on a distinguished road
Hi every body :

Hoping that every thing is going well.

i need urgent help please.

-the electrical conductivity and the specific heat in my case is not constant and they are a function of coordinates.

-the problem that the electrical conductivity in the material panel doesn't contains the udf option so how can i define it.

- for the specific heat, is there any way to define it? i know that it can be defined as a function of temperature but is there any way to define it as a function of coordinates?

thanks
walied123 is offline   Reply With Quote

Old   February 16, 2016, 04:50
Default
  #2
Senior Member
 
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 12
Bruno Machado is on a distinguished road
Quote:
Originally Posted by walied123 View Post
-the electrical conductivity and the specific heat in my case is not constant and they are a function of coordinates.
You need to create an UDS for the electrical conductivity and define the domains it will be computed.

Quote:
Originally Posted by walied123 View Post
-the problem that the electrical conductivity in the material panel doesn't contains the udf option so how can i define it.
The electrical conductivity should be defined in a DEFINE_DIFFUSIVITY macro and hooked to your UDS in the material panel.

Quote:
Originally Posted by walied123 View Post
- for the specific heat, is there any way to define it? i know that it can be defined as a function of temperature but is there any way to define it as a function of coordinates?
I am not sure about it. Once speaking with a Ansys worker, he said the Cp should be only dependent on temperature, because fluent solver is based on density and need a well established Cp.

If you have a look at here, you will see that neither cell or thread are given to the macro DEFINE_SPECIFIC_HEAT.

https://www.sharcnet.ca/Software/Ans...e_sp_heat.html
Bruno Machado is offline   Reply With Quote

Old   February 20, 2016, 20:26
Default
  #3
New Member
 
walied
Join Date: Aug 2014
Posts: 16
Rep Power: 11
walied123 is on a distinguished road
thank you Bruno Machado for your kind replay.

but it still not clear.can you please clear more?

if the electrical conductivity is Lamd=constant_1*x+constant_2*y what should i do to define it?

please can you step your kind reply?

thanks
M.Eid
walied123 is offline   Reply With Quote

Old   February 21, 2016, 14:21
Default
  #4
Senior Member
 
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 12
Bruno Machado is on a distinguished road
Quote:
Originally Posted by walied123 View Post
thank you Bruno Machado for your kind replay.

but it still not clear.can you please clear more?

if the electrical conductivity is Lamd=constant_1*x+constant_2*y what should i do to define it?

please can you step your kind reply?

thanks
M.Eid
Hi

the electrical conductivity must be defined as something like this (I am assuming it changes with x and y position):

DEFINE_DIFFUSIVITY(elec_diff,c,t,i)
{
real Lamd, constant_1, constant_2, x, y;
C_CENTROID(x,c,t);

constant_1 = XXXXXXX;
constant_2 = XXXXXXX;

x = C_CENTROID(x,c,t)[0];
y = C_CENTROID(x,c,t)[1];

Lamd=constant_1*x+constant_2*y;

return Lamd;
}


Change XXXXX for the values of your constant. After that, once you create an UDS, you can define this as your diffusivity for the new scalar.
Bruno Machado is offline   Reply With Quote

Old   February 21, 2016, 16:32
Default
  #5
New Member
 
walied
Join Date: Aug 2014
Posts: 16
Rep Power: 11
walied123 is on a distinguished road
thank you Bruno Machado for your kind reply

but still there are some questions.

1- does i compile the function as the same way of the UDF compilations?

2- from where can i assign the function to a domain....from the material panel like the UDF or what?


2- there are uds_0,uds_1 and so on............ at which uds can i define the function or i should define a new uds?

THANKS
walied123 is offline   Reply With Quote

Old   February 21, 2016, 16:50
Default
  #6
Senior Member
 
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 12
Bruno Machado is on a distinguished road
Quote:
Originally Posted by walied123 View Post
thank you Bruno Machado for your kind reply

but still there are some questions.

1- does i compile the function as the same way of the UDF compilations?
Yes, this is an UDF as any other. you can add the one I provided in your current UDF.

Quote:
2- from where can i assign the function to a domain....from the material panel like the UDF or what?
The diffusivity itself is defined in the material panel. But before define it, you gotta define your UDS (Define -> User Defined Function -> Scalars) and the domains you want it to be solved.

Quote:
2- there are uds_0,uds_1 and so on............ at which uds can i define the function or i should define a new ads?

THANKS
I did not get your question, but if you have more than 1 UDS, you can define an if statement in the diffusivity for different integers (i=1,2,3...)
Bruno Machado 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
UDF for specific heat and electrical conductivity walied123 Fluent UDF and Scheme Programming 4 February 20, 2015 06:17
IAPWS water properties + orthotropic thermal conductivity Chander CFX 1 February 29, 2012 17:26
Electrical conductivity of water in FLUENT ppcf FLUENT 0 August 29, 2011 20:30
Help with electrical conductivity in Fuel cells Golnaz FLUENT 3 June 17, 2011 16:21
How to add electrical conductivity in user defined sangeeta FLUENT 1 March 29, 2011 12:29


All times are GMT -4. The time now is 21:45.