# Conductivity as a vector value

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 30, 2015, 03:12 Conductivity as a vector value #1 Member   Nurzhan Join Date: Jan 2014 Posts: 52 Rep Power: 5 Hi Guys, I am trying to set a thermal conductivity as a full tensor so it varies based on one of the directions (X, Y, and Z). In order to set a magnitude of the conductivity, I looked at material properties and changed the magnitude there. However, my conductivity is described by three functions of temperature, each function per direction. I believe there is an easy way to do it, but I am failing to find the solution. Could you please help me? Cheers, Nurzhan Last edited by Nurzhan; August 31, 2015 at 04:50.

 August 30, 2015, 06:27 #2 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 13,867 Rep Power: 107 Use a CEL expression, interpolation function or junction box rountine. Nurzhan likes this.

 August 30, 2015, 15:28 #3 Senior Member   Join Date: Jun 2009 Posts: 699 Rep Power: 15 Based on the mathematical formalism for heat conduction, thermal conductivity cannot be a vector. It is a second order tensor, that for isotropic materials reduces to scalar. In the case of anisotropic thermal conduction, ANSYS CFX has a hidden feature to input the orthotropic conductivities (principal values on a specific orientation of the material) , or the full tensor. You can search this forum for "Thermal Conductivity X".. Otherwise, you should probably contact ANSYS CFX support for help. Either of those values can be set using CEL expression, interpolation functions or via user Fortran junction boxes. Nurzhan likes this.

 August 30, 2015, 17:50 #4 Member   Nurzhan Join Date: Jan 2014 Posts: 52 Rep Power: 5 Thank you very much for your responses! Cheers, Nurzhan

 August 31, 2015, 03:05 #5 Member   Nurzhan Join Date: Jan 2014 Posts: 52 Rep Power: 5 Hi Glenn/Opaque, I managed to set thermal conductivity as a full tensor using CEL as you advised me. However, the same way does not work for electrical conductivity. The error looks like that: ERROR CCL validation failed with message: Error: Invalid Option parameter 'Orthotropic Cartesian Components' Any ideas how to get over this problem? The feeling is like ANSYS intentionally stopping people to use electrical conductivity as a vector value. What do you think? Thank you in advance! Nurzhan Last edited by Nurzhan; August 31, 2015 at 04:50.

 August 31, 2015, 03:23 #6 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 13,867 Rep Power: 107 Thermal conductivity is not a vector. Opaque explained that very well. As the anisotropic thermal conductivity is a hidden feature that means it is not a supported feature. This means it has not completed all testing, may not be accurate or correctly implemented. For many of these cases it is because the introduction of this additional flexibility introduces additional terms into the modelled equations which CFX does not model. It is then user beware when you decide to use them. So no, it is unlikely that ANSYS has removed anisotropic electrical conductivity. Why would they develop it then remove it? What is far more likely is that it can introduce additional difficulties into the modelled equations and CFX has not got a model to handle that yet.

September 3, 2015, 00:06
#7
Member

Nurzhan
Join Date: Jan 2014
Posts: 52
Rep Power: 5
Quote:
 Originally Posted by Opaque Based on the mathematical formalism for heat conduction, thermal conductivity cannot be a vector. It is a second order tensor, that for isotropic materials reduces to scalar. In the case of anisotropic thermal conduction, ANSYS CFX has a hidden feature to input the orthotropic conductivities (principal values on a specific orientation of the material) , or the full tensor. You can search this forum for "Thermal Conductivity X".. Otherwise, you should probably contact ANSYS CFX support for help. Either of those values can be set using CEL expression, interpolation functions or via user Fortran junction boxes.
Hi Opaque,

I used your suggestion to set thermal conductivity for an anisotropic material, using an orthotropic coordinates option (shown below), it worked for me. Thanks!

THERMAL CONDUCTIVITY:
Option = Orthotropic Cartesian Components
Thermal Conductivity X Component= # [W m^-1 K^-1]
Thermal Conductivity Y Component= # [W m^-1 K^-1]
Thermal Conductivity Z Component= # [W m^-1 K^-1]
END

However, I tried to use the same method to set electrical conductivity for an anisotropic material, and it didn't work. Do you have any idea how to handle this problem?

Nurzhan

 September 3, 2015, 17:45 #8 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 13,867 Rep Power: 107 I do not think CFX can handle anisotropic electrical conductivity. Don't forget the anisotropic thermal conductivity is just a beta feature so is not fully supported.

 September 3, 2015, 19:41 #9 Senior Member   Join Date: Jun 2009 Posts: 699 Rep Power: 15 There are hidden ways to access the anisotropic diffusion model for several equations. If you contact ANSYS CFX, they can provide you with the following beta re-configuration of the electrical conductivity settings: Code: ```RULES: SINGLETON: ELECTRICAL CONDUCTIVITY Description = Hold the details for an advanced description of \ Electrical Conductivity. Solver Name = CONELEC Context Rule = Option Essential Parameter List = Option Allowed Option List = \ Value, \ Orthotropic Cartesian Components CONTEXT: Value Essential Parameter List = \ Electrical Conductivity END CONTEXT: Orthotropic Cartesian Components Essential Parameter List = \ Electrical Conductivity X Component, \ Electrical Conductivity Y Component, \ Electrical Conductivity Z Component END END PARAMETER: Electrical Conductivity X Component Parameter Type = Real Quantity Type = Electrical Conductivity Dynamic Reread Item = Yes Solver Name = CONELEC-1 Group Membership = VECTOR, CONELEC, 1 END PARAMETER: Electrical Conductivity Y Component Parameter Type = Real Quantity Type = Electrical Conductivity Dynamic Reread Item = Yes Solver Name = CONELEC-2 Group Membership = VECTOR, CONELEC, 2 END PARAMETER: Electrical Conductivity Z Component Parameter Type = Real Quantity Type = Electrical Conductivity Dynamic Reread Item = Yes Solver Name = CONELEC-3 Group Membership = VECTOR, CONELEC, 3 END END``` If you copy the rules above into a, say, aniso_eleccon.ccl, you can use along the cfx5solve command line as Code: `cfx5solve -def MyAnisoCase.def -ccl aniso_eleccon.ccl .....` Keep in mind that is not even beta, so you may have to validate the results carefully.

 September 3, 2015, 23:50 #10 Member   Nurzhan Join Date: Jan 2014 Posts: 52 Rep Power: 5 Thank you, guys! I do not know how to express my feelings right now - I really appreciate your help. Regards, Nurzhan

September 30, 2015, 20:58
#11
Member

Nurzhan
Join Date: Jan 2014
Posts: 52
Rep Power: 5
Hi Opaque,

I have been trying to apply the additional rules, written above to my simple simulation. However, I get an error saying that there is an "Error reading Command Language data from memory". I tried my simulation without the additional rules and the simulation worked fine. I decided to describe the procedure of my simulation below.

1) Setting all paramters in cfx pre (electrical conductivity specified as isotropic) and cube.def file is created:

Quote:
 # State file created: 2015/10/01 13:39:12 # CFX-14.5 build 2012.09.19-21.47 LIBRARY: ADDITIONAL VARIABLE: Electric Power Option = Definition Tensor Type = SCALAR Units = [W m^-3] Variable Type = Volumetric END MATERIAL: Solid Material Description = Aluminium Material Group = User Option = Pure Substance Thermodynamic State = Solid PROPERTIES: Option = General Material EQUATION OF STATE: Density = 2700 [kg m^-3] Molar Mass = 1.0 [kg kmol^-1] Option = Value END SPECIFIC HEAT CAPACITY: Option = Value Specific Heat Capacity = 0.91 [J kg^-1 K^-1] END THERMAL CONDUCTIVITY: Option = Value Thermal Conductivity = 237 [W m^-1 K^-1] END ELECTRICAL CONDUCTIVITY: Electrical Conductivity = 5 [S m^-1] Option = Value END END END END FLOW: Flow Analysis 1 SOLUTION UNITS: Angle Units = [rad] Length Units = [m] Mass Units = [kg] Solid Angle Units = [sr] Temperature Units = [K] Time Units = [s] END ANALYSIS TYPE: Option = Transient EXTERNAL SOLVER COUPLING: Option = None END INITIAL TIME: Option = Automatic with Value Time = 0 [s] END TIME DURATION: Option = Total Time Total Time = 100 [s] END TIME STEPS: Option = Timesteps Timesteps = 0.1 [s] END END DOMAIN: Cube Coord Frame = Coord 0 Domain Type = Solid Location = solid BOUNDARY: Ground Boundary Type = WALL Location = ground BOUNDARY CONDITIONS: ELECTRIC FIELD: Option = Ground END HEAT TRANSFER: Option = Adiabatic END END END BOUNDARY: High Voltage Boundary Type = WALL Location = highvoltage BOUNDARY CONDITIONS: ELECTRIC FIELD: Option = Voltage Voltage = 10 [V] END HEAT TRANSFER: Option = Adiabatic END END END BOUNDARY: Insulated Surfaces Boundary Type = WALL Location = externalsurfaces BOUNDARY CONDITIONS: ELECTRIC FIELD: Option = Zero Flux END HEAT TRANSFER: Option = Adiabatic END END END DOMAIN MODELS: DOMAIN MOTION: Option = Stationary END MESH DEFORMATION: Option = None END END SOLID DEFINITION: Solid 1 Material = Solid Option = Material Library MORPHOLOGY: Option = Continuous Solid END END SOLID MODELS: ADDITIONAL VARIABLE: Electric Power Additional Variable Value = Current Density X *Electric Field X + \ Current Density Y *Electric Field Y + Current Density Z *Electric \ Field Z Option = Algebraic Equation END ELECTROMAGNETIC MODEL: ELECTRIC FIELD MODEL: Option = Electric Potential END MAGNETIC FIELD MODEL: Option = None END END HEAT TRANSFER MODEL: Option = Thermal Energy END THERMAL RADIATION MODEL: Option = None END END END INITIALISATION: Option = Automatic INITIAL CONDITIONS: ELECTRIC POTENTIAL: Electric Potential = 0 [V] Option = Automatic with Value END TEMPERATURE: Option = Automatic with Value Temperature = 0 [C] END END END OUTPUT CONTROL: MONITOR OBJECTS: Monitor Coefficient Loop Convergence = On MONITOR BALANCES: Option = Full END MONITOR FORCES: Option = Full END MONITOR PARTICLES: Option = Full END MONITOR RESIDUALS: Option = Full END MONITOR TOTALS: Option = Full END END RESULTS: File Compression Level = Default Option = Standard END TRANSIENT RESULTS: Transient Results 1 File Compression Level = Default Include Mesh = No Option = Selected Variables Output Variables List = Electric Power,Electric Field,Electrical \ Conductivity,Current Density,Temperature OUTPUT FREQUENCY: Option = Timestep Interval Timestep Interval = 50 END END END SOLVER CONTROL: ADVECTION SCHEME: Option = High Resolution END CONVERGENCE CONTROL: Maximum Number of Coefficient Loops = 40 Minimum Number of Coefficient Loops = 1 Timescale Control = Coefficient Loops END CONVERGENCE CRITERIA: Residual Target = 0.000001 Residual Type = RMS END TRANSIENT SCHEME: Option = Second Order Backward Euler TIMESTEP INITIALISATION: Option = Automatic END END END END COMMAND FILE: Version = 14.5 END
(If I run the above code alone, I get an accurate result.)

However, when I apply the additional rules (a ccl file, named aniso_eleccon.ccl)

Quote:
 RULES: SINGLETON: ELECTRICAL CONDUCTIVITY Description = Hold the details for an advanced description of \ Electrical Conductivity. Solver Name = CONELEC Context Rule = Option Essential Parameter List = Option Allowed Option List = \ Value, \ Orthotropic Cartesian Components CONTEXT: Value Essential Parameter List = \ Electrical Conductivity END CONTEXT: Orthotropic Cartesian Components Essential Parameter List = \ Electrical Conductivity X Component, \ Electrical Conductivity Y Component, \ Electrical Conductivity Z Component END END PARAMETER: Electrical Conductivity X Component Parameter Type = Real Quantity Type = Electrical Conductivity Dynamic Reread Item = Yes Solver Name = CONELEC-1 Group Membership = VECTOR, CONELEC, 1 END PARAMETER: Electrical Conductivity Y Component Parameter Type = Real Quantity Type = Electrical Conductivity Dynamic Reread Item = Yes Solver Name = CONELEC-2 Group Membership = VECTOR, CONELEC, 2 END PARAMETER: Electrical Conductivity Z Component Parameter Type = Real Quantity Type = Electrical Conductivity Dynamic Reread Item = Yes Solver Name = CONELEC-3 Group Membership = VECTOR, CONELEC, 3 END END
and change the electrical conductivity using the following code (a ccl file, named solid.ccl):

Quote:
 LIBRARY: &replace MATERIAL: Solid Material Description = Aluminium Material Group = User Option = Pure Substance Thermodynamic State = Solid PROPERTIES: Option = General Material EQUATION OF STATE: Density = 2700 [kg m^-3] Molar Mass = 1.0 [kg kmol^-1] Option = Value END SPECIFIC HEAT CAPACITY: Option = Value Specific Heat Capacity = 0.91 [J kg^-1 K^-1] END THERMAL CONDUCTIVITY: Option = Value Thermal Conductivity = 237 [W m^-1 K^-1] END ELECTRICAL CONDUCTIVITY: Option = Orthotropic Cartesian Components Electrical Conductivity X Component = 5 [S m^-1] Electrical Conductivity Y Component = 0 [S m^-1] Electrical Conductivity Z Component = 0 [S m^-1] END END END END
Then I get the error.

I run all three codes using through the command line

Quote:
 cfx5solve -def cube.def -ccl aniso_eleccon.ccl -ccl solid.ccl
I checked the RULES file, where written that

Quote:
 The solver supports anisotropic electric conductivity as well, additional rules are needed. Translation in tt.txt is ready.
I did not want to bother you again and tried to figure out the problem myself. However, I cannot find a clue. I also do not have a direct access to ANSYS commercial portal and support, as I am a student.

Thanks for taking your time to read this.

Regards,
Nurzhan

 June 1, 2017, 01:14 #12 Member   Nurzhan Join Date: Jan 2014 Posts: 52 Rep Power: 5 Hi, guys! Sorry for coming back to this old post, but I really need your help. I am facing a problem with setting electrical conductivity for orthotropic cylindrical coordinates, where a value set per each direction is a temperature dependent expression. Everything works well with the above code, kindly provided by Opaque, if the values set for each Cartesian direction are constants. (Opaque, thank you very much for your code! It helped me a lot!) However, when I try to re-write the rules for cylindrical coordinates, I get an error. Could you please at least tell me any reference material, where a process of changing rules is described? Thank you in advance!

 June 1, 2017, 08:00 #13 Senior Member   Join Date: Jun 2009 Posts: 699 Rep Power: 15 If you look into the installation directory for the RULES, you should find the existing rules for Orthotropic Cylindrical Components used for the Thermal Conductivity. You should be able to create/add the Electrical Conductivity r/Theta/Axial Component parameters. Do not forget to include an AXIS DEFINITION as well.

 June 3, 2017, 23:06 #14 Member   Nurzhan Join Date: Jan 2014 Posts: 52 Rep Power: 5 Thank you, Opaque, for the reply! After several days of trials and studying the 'RULES' file, I updated my rules file. Opaque, could you please have a look at the below code: Code: ```Description = Hold the details for an advanced description of \ Electrical Conductivity. Solver Name = CONELEC Context Rule = Option Essential Parameter List = Option Allowed Option List = \ Value, \ Orthotropic Cylindrical Components CONTEXT: Value Essential Parameter List = \ Electrical Conductivity END CONTEXT: Orthotropic Cylindrical Components Essential Parameter List = \ Electrical Conductivity r Component, \ Electrical Conductivity Theta Component, \ Electrical Conductivity Axial Component Essential Child List = AXIS DEFINITION END END PARAMETER: Electrical Conductivity r Component Parameter Type = Real Quantity Type = Electrical Conductivity Dependency List = ANY Dynamic Reread Item = Yes Solver Name = CONELEC-1 Lower Bound = 0 [S m^-1] Group Membership = VECCYL, CONELEC, 1 END PARAMETER: Electrical Conductivity Theta Component Parameter Type = Real Quantity Type = Electrical Conductivity Dependency List = ANY Dynamic Reread Item = Yes Solver Name = CONELEC-2 Lower Bound = 0 [S m^-1] Group Membership = VECCYL, CONELEC, 2 END PARAMETER: Electrical Conductivity Axial Component Parameter Type = Real Quantity Type = Electrical Conductivity Dependency List = ANY Dynamic Reread Item = Yes Solver Name = CONELEC-3 Lower Bound = 0 [S m^-1] Group Membership = VECCYL, CONELEC, 3 END END``` I inserted "Dependency List = ANY" to my new code, so I can express conductivity as a function of temperature. In "Group Membership", I changed initial "VECTOR" to "VECCYL", as it is done for some other parameters in the 'RULES' file. After using this code, I get the following error: "ERROR #001100279 has occurred in subroutine ErrAction. Floating point exception: Zero divide." Despite that, my code works fine with isotropic conductivity (it was validated with experimental data) and orthotropic conductivity expressed in Cartesian coordinates, where conductivity in each direction is constant. Hence, it makes me believe that the above code has a bug, which leads to that error. Do you have any suggestions? Cheers,

 June 4, 2017, 12:43 #15 Senior Member   Join Date: Jun 2009 Posts: 699 Rep Power: 15 Not sure what version of ANSYS CFX you are using, but for Thermal Conductivity r Component, the group membership is ORTCYL2, not VECCYL. Similarly, the solver name should be 11, 22, and 33, not 1/2 or 3 Hope the above helps,

June 5, 2017, 01:30
#16
Member

Nurzhan
Join Date: Jan 2014
Posts: 52
Rep Power: 5
Opaque, thank you for your time and the suggestions.

I didn't get that error this time, and the run was successful. Though, I will have to study the results first, to be sure that they are valid.

BTW, why did you wrote 'VECTOR' in 'Group Membership', when you described electrical conductivity in the Cartesian coordinates (the quote is below)?
Quote:
 Group Membership = VECTOR, CONELEC, 1
As, for thermal conductivity, when described in Cartesian coordinates, there need to be 'ORTTEN2'. That is why I substituted 'VECTOR' with 'VECCYL', when I re-wrote the code for Cylindrical coordinates.

Anyway, thanks a lot!

 June 5, 2017, 10:10 #17 Senior Member   Join Date: Jun 2009 Posts: 699 Rep Power: 15 My apologies for the typo.. Definitely a mistake. For Cartesian components, there is little difference between a vector, and a diagonal 2nd order tensor. However, for cylindrical coordinates the orthotropic cylindrical components are not a diagonal 2nd order tensor in Cartesian coordinates; therefore, some mathematical manipulations required. I will correct my local rules for Cartesian components. Thank you..

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post iSaeed STAR-CCM+ 0 December 29, 2014 07:12 Jared1986 CFX 3 March 20, 2014 11:38 Chander CFX 2 April 15, 2012 18:01 Chander CFX 1 February 29, 2012 18:26 Greg Perkins FLUENT 3 August 5, 2001 21:53

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

 Contact Us - CFD Online - Privacy Statement - Top