Creating Case Control Deck

64 views
Skip to first unread message

miguel...@gmail.com

unread,
Feb 8, 2021, 9:02:13 AM2/8/21
to pyNastran Discuss
Hi

I loaded the bulk data from a bdf and now I want to create the case control deck. If I use bdf.case_control_deck it appears the line 'BEGIN BULK', but when writing the bdf it does not appear. I will also want to add the 'SOL 101', 'CEND', 'SPC = 1', etc...

¿Can I create the executive control and case control from scratch from within pynastran?

Thanks!

Alejandro Stewart

unread,
Feb 8, 2021, 9:20:08 AM2/8/21
to pynastra...@googlegroups.com
Hello,
I was able to create a single subcase (only needed one but I think it may be similar) with the following:
new_model.create_subcases([1])
sub_1=new_model.subcases[1]
sub_1.sol=101
sub_1.add('SPC',1,[],'STRESS-type')
sub_1.add('LOAD',2,[],'STRESS-type')
sub_1.add('FORCES',1,['PRINT','PLOT'],'STRESS-type')
sub_1.add_set_from_values(1, list(props.keys()))
new_model.update_solution(101,'',1)
to get:

SOL 101
CEND
$CASE CONTROL DECK
SUBCASE 1
    SET 1 = 1 THRU 30
    FORCE(PRINT,PLOT) = 1
    LOAD = 2
    SPC = 1
BEGIN BULK

Hope that helps

Alejandro

--
You received this message because you are subscribed to the Google Groups "pyNastran Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pynastran-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pynastran-discuss/1879bf83-2781-4704-bdde-eb61f3ffcce6n%40googlegroups.com.

miguel...@gmail.com

unread,
Feb 8, 2021, 12:57:03 PM2/8/21
to pyNastran Discuss
Thanks Alejandro, but I still don't get anything printed to the bdf file (when I use write_bdf method). There are only modifications in the bulk data entries.

Alejandro Stewart

unread,
Feb 8, 2021, 1:14:14 PM2/8/21
to pynastra...@googlegroups.com
Without seeing your code it is difficult, but my guess is that maybe you imported the model with punch=True

Steven Doyle

unread,
Feb 8, 2021, 1:23:50 PM2/8/21
to pyNastran Discuss
That looks like that is the case.  You need to set:
  model.punch = False

That should probably be handled by create_subcases.

miguel...@gmail.com

unread,
Feb 9, 2021, 3:28:11 AM2/9/21
to pyNastran Discuss
Thank you! Indeed was the because the punch=True. It is now solved using model.punch = False.
Reply all
Reply to author
Forward
0 new messages