Search found 2 matches

by davidosterberg
Thu Sep 28, 2023 7:40 am
Forum: OpenSeesPy
Topic: [Solved] Simple FSI problem
Replies: 2
Views: 6141

Re: Simple FSI problem

Hi again,

Thank you @mhscott for the encouragement :D

I managed to solve the problem by using the "parameter" and "updateParameter" commands.
Inspiration for this was one of your blog posts, and I did end up reading the C++ source to find out the arguments to the parameter command.

Here is an excerpt for future reference:

Code: Select all

...
ops.timeSeries('Constant', id_timeseries)
ops.pattern('Plain', id_pattern, id_timeseries)
ops.load(n, *[0.001, 0.0, 0.0])
ops.parameter(n, 'pattern', id_pattern, "loadAtNode", n, '1')

...            
                
for step in range(n_steps):
	...        
        f = slamming_force(Vrel, depth, Rc, chord)
        ops.updateParameter(id_pattern, f + 0.1)
by davidosterberg
Tue Sep 26, 2023 4:39 am
Forum: OpenSeesPy
Topic: [Solved] Simple FSI problem
Replies: 2
Views: 6141

[Solved] Simple FSI problem

Hi

I am trying to model a simplified FSI problem.

I have simplified the problem to this:

A cantilevered beam is affected by a point load at the top. This point load is a known function of time, node displacement, and node velocity.
I would like to solve this as a transient problem.

I am a beginner in OpenSees. Is this possible to set up? Any hints on how to do it?

This is what I tried, and it does not work.

Code: Select all

    ...
    ops.constraints('Plain')
    ops.numberer('RCM')
    ops.system('ProfileSPD')
    ops.test('NormUnbalance', 1e-6, 400)
    ops.algorithm('Newton')
    ops.integrator('Newmark', 0.5, 0.25)
    ops.analysis('Transient')
    ...
    for step in range(n_steps):
    
        # Trying to update the load
    	id_timeseries = 1
        id_pattern = 1
        t = ops.getTime()
        f = slamming_force(t, ops.nodeVel(n,1), ops.nodeDisp(n,1))
        ops.remove('pattern', id_pattern)
        ops.remove('timeSeries', id_timeseries)
        ops.timeSeries('Constant', id_timeseries)
        ops.pattern('Plain', id_pattern, id_timeseries)
        ops.load(n, *[f, 0.0, 0.0])

        ops.analyze(1, 0.0005)


Perhaps I could define a material for a zero length element to model this? Can that be done in python?