CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions > OpenFOAM CC Toolkits for Fluid-Structure Interaction

beamInCrossFlow FSI + magneticFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 12, 2021, 10:58
Default beamInCrossFlow FSI + magneticFoam
  #1
New Member
 
Join Date: Mar 2021
Posts: 9
Rep Power: 5
Deep1994 is on a distinguished road
In solids4Foam, there is ~/tutorials/fluidSolidInteraction/beamInCrossFlow/OscillatingElasticBeam. So, the beam oscillates within a viscous fluid medium. Supposing that the beam has some magnetic properties, I am trying to oscillate the beam using external magnetic fields. I was wondering if this is possible through a combination of solids4Foam and magneticFoam! Thank you!

Best regards
Deep1994 is offline   Reply With Quote

Old   March 22, 2021, 08:24
Default
  #2
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,086
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by Deep1994 View Post
In solids4Foam, there is ~/tutorials/fluidSolidInteraction/beamInCrossFlow/OscillatingElasticBeam. So, the beam oscillates within a viscous fluid medium. Supposing that the beam has some magnetic properties, I am trying to oscillate the beam using external magnetic fields. I was wondering if this is possible through a combination of solids4Foam and magneticFoam! Thank you!

Best regards
Hi,

It should be possible.

To check the concept, you can change the inlet to a wall in the oscillatingElasticBeam tutorial, then set the gravity in the solid to same largish number in the original flow direction. If you solve this case, then the beam will oscillate under gravity (body force) causing motion in the fluid.

If this all works fine then the next step would be to incorporate the magneticFoam equation into one of the solid models. I would start from thermalLinGeomSolid which sequentially solves the temperature equation and displacement equation. In that case a source term appears in the displacement equation from the temperature. So in the magnetic case you would replace the temperature equation with the magnetic equation which I guess will generate a body force source term in the displacement equation.

Philip
bigphil is offline   Reply With Quote

Old   March 22, 2021, 12:13
Default
  #3
New Member
 
Join Date: Mar 2021
Posts: 9
Rep Power: 5
Deep1994 is on a distinguished road
Dear Philip,
Thank you for replying!

I have made the inlet as a wall. I've then changed the gravity to value (5 0 0) to see how the beam deforms over time along the x-direction. The beam does deform, but it doesn't oscillate in true terms!

To visualize an oscillation just using the gravity (body) force, I need to say give an oscillating force field, something that varies sinusoidally (for example). Could you please tell me how to incorporate this temporal variation of g?

g = (5*sin(2*time) 0 0) does not seem to work! Please tell me how I could "code" this change?


Best regards,
Ratnadeep
Deep1994 is offline   Reply With Quote

Old   March 22, 2021, 18:22
Default
  #4
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,086
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
You can see the displacement equation for the linGeomTotalDispSolid solid model in the evolve function of solids4foam/src/solids4FoamModels/solidModels/linGeomTotalDispSolid/linGeomTotalDispSolid.C:
Code:
            fvVectorMatrix DEqn
            (
                rho()*fvm::d2dt2(D())
     	     == fvm::laplacian(impKf_, D(), "laplacian(DD,D)")
              - fvc::laplacian(impKf_, D(), "laplacian(DD,D)")
              + fvc::div(sigma(), "div(sigma)")
              + rho()*g()
              + stabilisation().stabilisation(D(), gradD(), impK_)
            );
So you can create an oscillating vector force and add it to the equation, where you create and update it outside the outer loop e.g.
Code:
	// Time-varying body force
        const dimensionedVector timeVaryingBodyForce
        (
            "timeVaryingBodyForce",
            dimLength*dimLength/dimTime,
            vector(5*Foam::sin(2.0*runTime().value()), 0.0, 0.0)
        );

	// Momentum equation loop                                                                              
        do
        {
            ...

            fvVectorMatrix DEqn
            (
                rho()*fvm::d2dt2(D())
     	     == fvm::laplacian(impKf_, D(), "laplacian(DD,D)")
              - fvc::laplacian(impKf_, D(), "laplacian(DD,D)")
              + fvc::div(sigma(), "div(sigma)")
              + rho()*g()
              + rho()*timeVaryingBodyForce
              + stabilisation().stabilisation(D(), gradD(), impK_)
            );

Philip
bigphil is offline   Reply With Quote

Old   March 23, 2021, 00:09
Default
  #5
New Member
 
Join Date: Mar 2021
Posts: 9
Rep Power: 5
Deep1994 is on a distinguished road
Dear Philip,
Thank you for your reply. I have tried 'exactly' as you mentioned. However, I do not see any effect of this change on the output/result. It looks as if the simulation is lacking this change of information. Maybe could I do/try something more in the TimeVaryingBodyForce anecdote? Could you please help me resolve this issue!


Best regards,
Philip
Deep1994 is offline   Reply With Quote

Old   March 23, 2021, 07:21
Default
  #6
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,086
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by Deep1994 View Post
Dear Philip,
Thank you for your reply. I have tried 'exactly' as you mentioned. However, I do not see any effect of this change on the output/result. It looks as if the simulation is lacking this change of information. Maybe could I do/try something more in the TimeVaryingBodyForce anecdote? Could you please help me resolve this issue!


Best regards,
Philip
Did you compile the code after making the changes? i.e. using "wmake libso".
bigphil is offline   Reply With Quote

Old   March 23, 2021, 07:59
Default
  #7
New Member
 
Join Date: Mar 2021
Posts: 9
Rep Power: 5
Deep1994 is on a distinguished road
Dear Philip,

I am sorry I did not do that; please could you tell me in which directory (or path) should I need to run this command? kindly tell me the steps that I should have to follow sequentially, so as to compile the simulation.

Best regards,
Ratnadeep
Deep1994 is offline   Reply With Quote

Old   March 23, 2021, 08:37
Default
  #8
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,086
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
I suggest you go through some tutorials on coding in OpenFOAM first e.g. https://wiki.openfoam.com/Programming; then if you specific questions related to solids4foam, you can post again here.

Philip
bigphil is offline   Reply With Quote

Old   March 23, 2021, 10:12
Default
  #9
New Member
 
Join Date: Mar 2021
Posts: 9
Rep Power: 5
Deep1994 is on a distinguished road
Sure Philip, this website shall be helpful of course. Thanks!
Deep1994 is offline   Reply With Quote

Old   March 23, 2021, 10:13
Default immersed boundary method in foam-extend
  #10
New Member
 
Join Date: Mar 2021
Posts: 9
Rep Power: 5
Deep1994 is on a distinguished road
Dear Philip,

I was just wondering if foam-extend 4.0 (or solids4foam) has the immersed boundary solver for large deformation fluid-structure interaction. Since there is a mesh degradation/distortion during large deformation, I was willing to use non-conformal meshes, however, solids4foam FSI has conformal meshes (ALE) I guess. Could you kindly suggest to me something about this?

Finally, does solids4Foam always use conformal meshes for FSI problems? Is there any tutorial/case setup for FSI with non-conformal mesh?
Deep1994 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FSI: How to transfer static pressure from fluent to ANSYS momo_sjx FLUENT 0 October 9, 2012 14:37
User-defined force transfer across FSI interface vivekcfd CFX 7 March 10, 2010 21:43
BCs in an FSI simulation of a flexble pipe vivekcfd OpenFOAM 10 January 8, 2010 05:14
fsi sun Siemens 8 January 20, 2009 00:17
how to extend FSI 2D codes to 3D, need advises abouziar Main CFD Forum 1 May 30, 2008 05:08


All times are GMT -4. The time now is 22:07.