CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How to stop the oversetMesh from leaving the main domain

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By Alczem
  • 1 Post By Alczem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 1, 2024, 13:16
Default How to stop the oversetMesh from leaving the main domain
  #1
npb
New Member
 
Join Date: Nov 2022
Posts: 20
Rep Power: 3
npb is on a distinguished road
Hello!
I am trying to simulate something like a stone falling down in a vessel. I use OF v2312, oversetMesh and sixDoFRigidBodyMotion without any constraints and restraints (because I want the solid object to move according to the flow). I include the libs (overset fvMotionSolvers) in the controlDict file. But the problem is that the object falls down and leaves the main domain. How can I make it "feel" there is a bottom? Maybe I should include some restraints, but I don't know what exactly.

I have another issue, which is related to the complex geometry of the main vessel. I use the adjustTimeStep and maxCo options, but the result is a very huge Courant Number and very small deltaT - smaller than 1e-20 or 1e-30. Is there any possibility to fix this besides making finer mesh, which would probably lead to very small deltaT again?

I would highly appreciate any advice!

Best regards!
npb is offline   Reply With Quote

Old   April 2, 2024, 10:21
Default
  #2
Senior Member
 
Join Date: Dec 2021
Posts: 209
Rep Power: 5
Alczem is on a distinguished road
Hey!


Without going as far as modelling proper impact, there is a constraint that acts as a soft wall:


https://www.openfoam.com/news/main-n...sics#soft-wall


Maybe it can suit your needs!
Yann and npb like this.
Alczem is offline   Reply With Quote

Old   April 3, 2024, 04:29
Default
  #3
npb
New Member
 
Join Date: Nov 2022
Posts: 20
Rep Power: 3
npb is on a distinguished road
Thank you very much for your reply, Alczem! It really suits my case and helped me a lot! The only problem now is that whenever the object reaches the bottom, this leads to error and the simulation stops. Maybe I did not use proper values for psi and C (first I used 0 for both). Actually, I tried different values, but then it behaved very strange - the object goes far away outside the domain in the side and upper direction for example. Do you have any recommendations for these parameters?

Thanks a lot again and best regards!
npb is offline   Reply With Quote

Old   April 3, 2024, 04:56
Default
  #4
Senior Member
 
Join Date: Dec 2021
Posts: 209
Rep Power: 5
Alczem is on a distinguished road
I never used it myself, but you can check out the source code of the constraint. There we can see this:


Code:
{
    restraintPosition = motion.transform(refAttachmentPt_);
    restraintForce = Zero;
    restraintMoment = Zero;

    const vector r(restraintPosition - anchor_);

    const vector v(motion.velocity(restraintPosition));

    const scalar d = (wallNormal_/mag(wallNormal_)) & r;

    const vector rDir(r/(mag(r) + VSMALL));

    const scalar m = motion.mass();
    const scalar wn = 3.14/C_;
    const scalar damping = psi_*2*wn*m;
    const scalar stiffness = sqr(wn)*m;

    if (d < 0)
    {
        restraintForce = (-damping*(rDir & v) + stiffness*d)*rDir;
        restraintMoment = restraintPosition^restraintForce;
    }

    if (motion.report())
    {
        Info<< " restraintPosition: " << restraintPosition
            << " restraintForce: " << restraintForce
            << " restraintMoment: " << restraintMoment
            << endl;
    }
}
So C and psi have to do with damping and stiffness. You can probably compute reasonable values depending on the mass of your system and its terminal velocity.


It also seems to me that the anchor point should be away from the wall you want to avoid, in order to let d become negative. For instance, if your "ground" is at z=0m, maybe have the anchor at z=0.5m and wallNormal should be (0,0,1). I don't know how you first set up the constraint, but that is my interpretation of the code.
npb likes this.
Alczem is offline   Reply With Quote

Old   April 4, 2024, 06:58
Default
  #5
npb
New Member
 
Join Date: Nov 2022
Posts: 20
Rep Power: 3
npb is on a distinguished road
Yes, I will try to calculate some reasonable values. Тhank you very much for your help and advices!
npb is offline   Reply With Quote

Reply


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
PEMFC tutorial case problem Suleyman41 FLUENT 2 July 15, 2023 11:16
Can CFX model periodic heat transfer problem Ethan_Sparkle CFX 41 June 14, 2017 07:22
Sudden increase the residual of Maxwell's equations hsezsz CFX 2 October 13, 2016 06:58
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
domain imbalance for enrgy equation happy CFX 14 September 6, 2012 01:54


All times are GMT -4. The time now is 01:28.