Winkler foundation via ShallowFoundationGen command, but with Python instead of tcl

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
andred
Posts: 3
Joined: Sun Jun 18, 2023 1:50 pm

Winkler foundation via ShallowFoundationGen command, but with Python instead of tcl

Post by andred » Fri Aug 25, 2023 5:12 pm

Hi there,

I'm currently trying to generate a Winkler foundation according to the ShallowFoundationGen command made by Prishati Raychowdhury.

However, I am trying to do this on Python, not tcl.

On tcl, the code looks like this, where "Input1.txt" just contains parameters for the foundation generation command.

set FoundationTag 1
#ShallowFoundationGen $FoundationTag $ConectNode $InputFileName $FootCondition
ShallowFoundationGen $FoundationTag 1 "Input1.txt" 5
source Foundation_$FoundationTag.tcl

It's that last line, 'source Foundation_$FoundationTag.tcl', that I'm having trouble with. Is there any way to make a Python equivalent of that line, without using tcl at all?

Any input would be greatly appreciated, many thanks!

Post Reply