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

codedMixed boundary condition for switching between no-slip and slip

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   May 27, 2021, 05:28
Default codedMixed boundary condition for switching between no-slip and slip
  #1
Member
 
Join Date: Mar 2021
Posts: 39
Rep Power: 5
trailer is on a distinguished road
Hello,


I would like to create a mixed boundary condition where based, on a switch, I change the boundary from no-slip to slip.


Let's assume that after 1s of simulation the walls go from no slip to slip.



For the time being I have:


Code:
myPatch
    {
        type            codedMixed;
        refValue        uniform (0 0 0);
        refGradient     uniform (0 0 0);
        valueFraction   uniform 0;

        name    myBC;   

        code
        #{

        // Access the current value of time
        const Time& time = mesh.time();

        const scalar t = time.value();

        // Loop over the patch
       forAll(patch(), faceI)
        {   

              if(t < 1)
              {
                // Imposes no-slip boundary condition
                  this->refValue()[faceI] = vector::zero; 
                  this->valueFraction()[faceI] = scalar(1); 
              }
              else
              {
                // Imposes slip boundary condition

                 ?Help needed here?

              }
          
        }
      #};
     }

However, I am quite new at this and would appreciate the help.
trailer is offline   Reply With Quote

 


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
Table bounds warnings at: END OF TIME STEP CFXer CFX 4 July 16, 2020 23:44
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 07:30
Radiation interface hinca CFX 15 January 26, 2014 17:11
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 06:28
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00


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