×

Notice

The forum is in read only mode.

Modal analysis using substructuring strategy

  • Quentin
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 3 weeks ago #8147 by Quentin
Well I just found it... my command was wrong ... sorry for that mess !

I'll post later, after having test some of the functions !
  • Quentin
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 3 weeks ago #8149 by Quentin
Hi Richard,

I've a little problem using python inside *.comm :

I have succeeded writing a text file with info like name of nodes' group and their coordinates, but after that I was looking to append this file. This is the part where I failed.
file = open('/home/qmercier/Aster/TESTPREPGEOM/MAIL0.txt','a+')
chaine='Name : int'
for line in file:
	file.write('tic-tac %s\n')
	if chaine in line:
		file.write('blablabalbal %s\n')

file.close()

The idea is to get the nodes' group name, and then put automatically embedded connection at the interfaces of my substructures. But for now I just want my script to write again in my file MAIL0.txt (where there is my nodes' group and coordinates). That's where my script failed. Although I don't get any error message by running the script, the file simply not get append...

Do you have any idea ?

I know the subject of my problems has changed a bit, but I prefer not to create a new post. Because this post will describe all the problem I've been through my internship. It makes my report redaction much more easy !
  • Quentin
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 3 weeks ago #8150 by Quentin
I think I might get it !

By writing in the file, I'm changing the number of line in my file, and so my loop is changing. It must do something, cause when I use 'w+' instead of 'a+', the file goes from 10 line written to 0.
Whatever, I hope you got what I meant. Is my thinking right ?
More
10 years 3 weeks ago #8151 by RichardS
Not sure if I get it correctly,

but this seems like a problem only related to python
so it would be more appropriate to ask example at stackoverflow.com/ or similar sites.

Best,
Richard

SimScale - Engineering Simulation in your browser!
  • Quentin
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 1 week ago #8175 by Quentin
Hi everyone,

My code is now running correctly. Vibration modes are calculated pretty well, and I can easily display the displacement. As I said at the beginning of the post, this is my first project using ASTER, so I'm kinda new to the post treatment. To verify my results, I would love to see the stress of the structure.
Where should I code this ? In ASTER or in PARAVIS ?
  • Quentin
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 6 days ago - 10 years 6 days ago #8190 by Quentin
Hello guys ! I hope, you all did have a great weekend !

New step = new problems !. I'm now trying to build my entire code using loops ! I kinda have troubles doing the ASSE_ELEM_SSD. I think I should use 'from Accas import _F', to create the "_F();" functions automatically in the code. Do you guys have ever used this ? I might have some questions using it !

See you !
Quentin
Last edit: 10 years 6 days ago by Quentin.
Moderators: catux
Time to create page: 0.129 seconds
Powered by Kunena Forum