General Mechanical

General Mechanical

Inputing temperature boundary conditions from CSV file

    • VictorV
      Subscriber

      Hello,

      I would like to simulate a thermoelastic problem on Ansys workbench. I have externally determined temperatures that I want to input as boundary conditions in a steady state thermal simulation. For each time step, I have several temperatures to input for the thermal simulations, so for each timestep I can copy the temperature in the tabular environment, like in the picture.

      However this is just one of my many boundary conditions, and I have many cases of different temperature fields to run, so I would need to copy and paste a lot of columns. This is a screenshot of the temperature boundary conditions I have to set.

      My temperature boundary conditions are stored in a CSV file. Instead of copying and pasting the columns for the temperature as a function of time, I wanted to  have each temperature associated with a column in that CSV file. For example the time is equal to the values in the first column, FF1 equal to the values in the second column, FF2 equal to the values in the third column etcetera. So if I change the CSV, I can have the simulation quickly run with the new values.

      I tried using the External Data block in workbench and it seems to correctly import the data from the CSV:

      And I could link it to the model.

      However, I cannot use this external data as input for the temperature boundary conditions because the imported temperature cannot be applied because Direct Assignment weighting is not supported.

      This is as far as I've got in this problem, there seems to be no possibility of assigning each column of the CSV to the temperature of each geometry object.

      Does anyone know a quicker way than copying and pasting the temperatures on each case on each boundary condition?

      Thanks for the help.

       

    • Aniket
      Ansys Employee

      External data can be used to map temperatures on nodes, so along with the temperatures, you should have node locations on which these temperatures are applied as well. Looking at the third image, that does not seem to be the case. What you can do is create a separate text file for each time step, which will contain all the nodes for all boundary conditions and then scope the files to each time step using data view.

      Alternatively you can also automate this process via python using ACT, something on the lines of:

      Change Tabular Data Values of a Standard Load or Support (ansys.com) 

      -Aniket

      How to access Ansys help links

      Guidelines for Posting on Ansys Learning Forum

    • a.acheampong
      Subscriber

      Hello Victor,

      I have performed a similar analysis before where I used 182 csv files (i.e 182 seconds) to map onto my Static analysis simulation.

      The mesh and the geometry must be in the same x,y,z coordinate system.

      I used the external data as below

      This is how csv time 155s looks like. You do the same for all files 

       

      Now back to the mechanical environment the analysis settings for both thermal and the static structural should be set to 182 steps

      The imported data looks like this;

       

      Use the same method for the static structural and make sure the time step is set to the same as thermal

      You should get something similar to this

       

      Hope this helps

       

       

Viewing 2 reply threads
  • You must be logged in to reply to this topic.