I want to enter my temperature as a function of radius as T(r,Θ) = T0 * (r/r0 ) * cosΘ. where theta is 0 degrees, r0 is outer radius, T0 is outer temperature. my question is how to build a relation between radius and temperature in APDL, then?
This is indeed a very good question. What I understood from your question is that you want to apply a temperature boundary condition which is function of radius and angle and apply it on a cylindrical shape feature. I did something very similar for solving an thermoelectrical problem sometimes back and developed a script in Mechanical to do so, however, with a little bit of work you can do this manually in workbench and then use this idea to develop your code in APDL (which I’m not expert in it!!). There are 4 steps you need to take that I explain them in detail.
1. Since temperature is a function of radius and angle, you need to measure these coordinates first. Therefor, you need to create a cylindrical coordinate system and place it on a proper location which enables you to measure required coordinates.
2. Select the feature that you want to apply the temperature on (e.g. body or surface) and convert that feature to nodes by using the function that is shown in Capture.jpg.
3. From “Home” menu, select “Selection Information” (in “Tools” context). Adjust the coordinate system to reflect the coordinate system you just created. Now you have something very similar to Capture2.JPG. Right click on one of the table cells and export the table to an excel file format. You can calculate the temperature on each node as a function of radius and angle now.
4. Last step would be applying temperature on each node by using command snippet (D command).
This is the only way I know for applying unconventional BCs.