Assigning multiple pressure loads from a single file Answered

Hi,

I have crated a simple plate on OnScale and I want to apply 5 different pressure loads to 5 different elements on the top surface of the plate.

The pressure histories are in  a .csv file: Column 1 contains time data and Columns 2-6 contain the pressure data.

Is there a way to import this csv file and associate to each of the 5 elements a pressure history ?(element1 -> column 1 and column 2, element2 -> column1 and column3, element3 -> column1 and column 4, element4 -> column 1 and column5, element5 -> column 1 and column6.)

I know I can create 5 distinct .csv files and import each one of them on OnScale, but I am interested in using just one file.

Thanks a lot,

Kostas

5 comments

  • Official comment

    Hi Kostas,

    Have a look at the attached example. Lines 137-164 shows how you can read data from a CSV and manipulate the data into seperate arrays that can then be applied to loads.

    CSV_Example

    Oliver

    Comment actions Permalink
  • Hi Oliver,

    That's great, thanks a lot !!

    Just one more question, I see at line 142 you create a new data array, and this data ray you use at line 151 to specify the history function. You then use this function to specify the pressure load.

    Is it possible to do this without creating a new data array (actually 10 new arrays in this case) ? 

    The reason I ask is because in my actual problem I have a mesh with box = 0.1mm and for a region of 10mm x 20mm I want to specify a pressure history for each element, but I get an error 'too many names' because I have to create a data array for each element I want to load.

     

    Thanks in advance 

    Comment actions Permalink
  • Hi Kostas,

     

    The example we have provided also creates 10 data arrays and doesn't throw an error. Could you possibly share your files via your preferred cloud sharing service so we can take a look at what is happening please?

     

    Best Regards,

    Chloe

    Comment actions Permalink
  • Hi Chloe,

    Yes the example you provides works, but that's because the excel file you provided has not a lot of columns, so you have to create only 10 data arrays. If you has to create say 20000 data arrays you would get an error : 'too many names'

    Thanks,

    Kostas

    Comment actions Permalink
  • Hi Chloe,

    Below is my code to take a look : 

    https://drive.google.com/file/d/1mNBL0ZhDb-dJ0_wxAdKKxDIWKywG2cF3/view?usp=sharing

    Thanks,

    Kostas

    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post