[Solved] Simple FSI problem

Forum for asking and answering questions related to use of the OpenSeesPy module

Moderators: silvia, selimgunay, Moderators

Post Reply
davidosterberg
Posts: 2
Joined: Fri Sep 08, 2023 10:09 pm

[Solved] Simple FSI problem

Post by davidosterberg » Tue Sep 26, 2023 4:39 am

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?
Last edited by davidosterberg on Thu Sep 28, 2023 9:57 am, edited 1 time in total.

mhscott
Posts: 875
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: Simple FSI problem

Post by mhscott » Wed Sep 27, 2023 4:50 am

That should work. You will have to try the approach out and compare against an expected or known solution.

davidosterberg
Posts: 2
Joined: Fri Sep 08, 2023 10:09 pm

Re: Simple FSI problem

Post by davidosterberg » Thu Sep 28, 2023 7:40 am

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)

Post Reply