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

multi-region problem with dynamic mesh

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

Like Tree2Likes
  • 1 Post By Tobi
  • 1 Post By shach934

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2019, 13:38
Default multi-region problem with dynamic mesh
  #1
New Member
 
shach
Join Date: Apr 2019
Posts: 24
Rep Power: 2
shach934 is on a distinguished road
Hi foamers,
I am wandering if the multiregion solver like chtMultiRegionFoam support dynamicMesh. By dynamicMesh, i mean solid moving part, not dynamic refine mesh. Anyone has experience with it?
Thanks1
shach934 is offline   Reply With Quote

Old   July 1, 2019, 16:08
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Augsburg
Posts: 2,246
Blog Entries: 6
Rep Power: 38
Tobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,


simple answer. No it is not implemented. The meshes are derived from the fvMesh class and not the dynamic mesh class.


Code:
   forAll(fluidNames, i)                                                       
    {                                                                           
        Info<< "Create fluid mesh for region " << fluidNames[i]                 
            << " for time = " << runTime.timeName() << nl << endl;              
                                                                                
        fluidRegions.set                                                        
        (                                                                       
            i,                                                                  
            new fvMesh                                                          
            (                                                                   
                IOobject                                                        
                (                                                               
                    fluidNames[i],                                              
                    runTime.timeName(),                                         
                    runTime,                                                    
                    IOobject::MUST_READ                                         
                )                                                               
            )                                                                   
        );                                                                      
    }

However, it is possible to re-built the solvers for dynamic meshes. As an idea, if we use dynamic meshes, we do have to implement it as follows (this is just the createDynamicMesh.H file.



Code:
    Info<< "Create mesh for time = "                                            
        << runTime.timeName() << nl << endl;                                    
                                                                                
    autoPtr<dynamicFvMesh> meshPtr                                              
    (                                                                           
        dynamicFvMesh::New                                                      
        (                                                                       
            IOobject                                                            
            (                                                                   
                dynamicFvMesh::defaultRegion,                                   
                runTime.timeName(),                                             
                runTime,                                                        
                IOobject::MUST_READ                                             
            )                                                                   
        )                                                                       
    );                                                                          
                                                                                
    dynamicFvMesh& mesh = meshPtr();
If you implement the dynamic mesh lib within the solid region, make sure to include the mesh fluxes into the energy equation. Right now, there are no fluxes included.


Code:
        fvScalarMatrix hEqn                                                     
        (                                                                       
            fvm::ddt(betav*rho, h)                                              
          - (                                                                   
                thermo.isotropic()                                              
              ? fvm::laplacian(betav*thermo.alpha(), h, "laplacian(alpha,h)")   
              : fvm::laplacian(betav*taniAlpha(), h, "laplacian(alpha,h)")      
            )                            

          + fvm::div(theMeshFluxFieldPhi, h)                                      
          ==                                                                    
            fvOptions(rho, h)                                                   
        );
I guess all information are given. Good luck,
Tobi
atulkjoy likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 1, 2019, 16:41
Default
  #3
New Member
 
shach
Join Date: Apr 2019
Posts: 24
Rep Power: 2
shach934 is on a distinguished road
Hello Tobi,
I just tried with a simple case and found out the dynamicMesh is not implemented by chtMultiRegionFoam...
Thanks a lot for the instruction, I will try it tomorrow and update it later if it works.
atulkjoy likes this.
shach934 is offline   Reply With Quote

Old   July 2, 2019, 07:22
Default
  #4
New Member
 
shach
Join Date: Apr 2019
Posts: 24
Rep Power: 2
shach934 is on a distinguished road
Hi Tobi,
I am trying to implement this solver. However, I have a question about the fluid domain. I want to rotate the solid region, but the solid region is not a regular cylinder, the rotating region I difned is a cyliner, AMI boundary is used. Fluid cannot be totally excluded from the rotating region. So I do need to include the correctPhi for the fluid region too?
Then, if the solver works, the fluid and solid both need a dynamicMeshDict and with the same rotating velocity and coupled surface. Do you think this will work?
Thanks!


Quote:
Originally Posted by Tobi View Post
Hi,


simple answer. No it is not implemented. The meshes are derived from the fvMesh class and not the dynamic mesh class.


Code:
   forAll(fluidNames, i)                                                       
    {                                                                           
        Info<< "Create fluid mesh for region " << fluidNames[i]                 
            << " for time = " << runTime.timeName() << nl << endl;              
                                                                                
        fluidRegions.set                                                        
        (                                                                       
            i,                                                                  
            new fvMesh                                                          
            (                                                                   
                IOobject                                                        
                (                                                               
                    fluidNames[i],                                              
                    runTime.timeName(),                                         
                    runTime,                                                    
                    IOobject::MUST_READ                                         
                )                                                               
            )                                                                   
        );                                                                      
    }

However, it is possible to re-built the solvers for dynamic meshes. As an idea, if we use dynamic meshes, we do have to implement it as follows (this is just the createDynamicMesh.H file.



Code:
    Info<< "Create mesh for time = "                                            
        << runTime.timeName() << nl << endl;                                    
                                                                                
    autoPtr<dynamicFvMesh> meshPtr                                              
    (                                                                           
        dynamicFvMesh::New                                                      
        (                                                                       
            IOobject                                                            
            (                                                                   
                dynamicFvMesh::defaultRegion,                                   
                runTime.timeName(),                                             
                runTime,                                                        
                IOobject::MUST_READ                                             
            )                                                                   
        )                                                                       
    );                                                                          
                                                                                
    dynamicFvMesh& mesh = meshPtr();
If you implement the dynamic mesh lib within the solid region, make sure to include the mesh fluxes into the energy equation. Right now, there are no fluxes included.


Code:
        fvScalarMatrix hEqn                                                     
        (                                                                       
            fvm::ddt(betav*rho, h)                                              
          - (                                                                   
                thermo.isotropic()                                              
              ? fvm::laplacian(betav*thermo.alpha(), h, "laplacian(alpha,h)")   
              : fvm::laplacian(betav*taniAlpha(), h, "laplacian(alpha,h)")      
            )                            

          + fvm::div(theMeshFluxFieldPhi, h)                                      
          ==                                                                    
            fvOptions(rho, h)                                                   
        );
I guess all information are given. Good luck,
Tobi
shach934 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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] preserveFaceZones constraint on a multi region mesh ViktorKL OpenFOAM Meshing & Mesh Conversion 5 May 21, 2019 11:45
[snappyHexMesh] Creating multiple multiple cell zones with snappyHexMesh - a newbie in deep water! divergence OpenFOAM Meshing & Mesh Conversion 0 January 23, 2019 04:17
Dynamic mesh problem entlit FLUENT 0 June 9, 2016 04:19
Local mesh refinement definition in a DEFORMING dynamic mesh zone using Dynamic Mesh Emanuele88 FLUENT 0 February 9, 2016 11:39
Suggestions for a multi region conjugate heat transfer problem maddalena OpenFOAM 14 September 4, 2013 18:03


All times are GMT -4. The time now is 23:35.