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

Add radial g to bouyantPimpleFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 23, 2015, 11:21
Default Add radial g to bouyantPimpleFoam
  #1
New Member
 
Join Date: Apr 2015
Posts: 9
Rep Power: 10
arnolnic is on a distinguished road
Hi everyone,

I am trying to implement a radial gravitation to my solver, which is based on the buoyantBussinesqPimpleFoam solver.

Therefore I added a volVectorField "Ge" to createField.H as follows
PHP Code:
    //Definition vom Ursprungsvektor
    
vector origin (0,0,0);

   
//Definition der Konstante gc
    
scalar gc (10);  


    
//Definition of radial vectorfield Ge
    
volVectorField Ge
    
(
        
IOobject
        
(
       
"Ge",
        
runTime.timeName(),
        
mesh,
        
IOobject::NO_READ,
        
IOobject::AUTO_WRITE
        
),
        
mesh,
        
dimensionedVector("Ge"dimAccelerationvector::zero)
    );

    
//Definition für Feldschleife
    
forAll(mesh.C(),i)
    {
    
//Info<<mesh.V()[i]<<endl;
    
vector dif (origin-mesh.C()[i]);                    //
    
Ge[i]=(pow(mag(origin-mesh.C()[i]),-1))*dif*gc;     //unit vector*gc
    

This part works just fine, as the attached picture proves.
Afterwards I simply added a volScalarField "Geh" and a surfaceScalarField "Gehf" like it's done with the normal gravity g:
PHP Code:
    //Definition vom neuen Feld Geh & Gehf
    
Info<< "Calculating field g.h\n" << endl;
    
volScalarField gh("gh"mesh.C());
    
surfaceScalarField ghf("ghf"mesh.Cf());
    
volScalarField Geh("Geh"Ge mesh.C());
    
surfaceScalarField Gehf("Gehf"mesh.Cf());

    
volScalarField p
    
(
        
IOobject
        
(
            
"p",
            
runTime.timeName(),
            
mesh,
            
IOobject::NO_READ,
            
IOobject::AUTO_WRITE
        
),
        
p_rgh rhok*(gh+Geh)
    ); 
Unfortunately it's not that simple... I can't substitute Ge for g in the definition of the surfaceScalarField Gehf or otherwise an error occurs while compiling.
PHP Code:
errorno matching constructor for initialization of
      
'surfaceScalarField' (aka 'GeometricField<scalar, fvsPatchField,
      Foam::surfaceMesh>'
)
    
surfaceScalarField Gehf("Gehf"Ge mesh.Cf()); 
I guess that's the cracking point why the "new gravity Field" has no influence on the convective heat transfer inside my geometry!

I appreciate any kind of help.
Thanks in advance
Attached Images
File Type: jpg Ge_field.jpg (53.0 KB, 14 views)
File Type: jpg p.jpg (62.7 KB, 11 views)
Attached Files
File Type: h createFields.H (3.1 KB, 6 views)
File Type: h pEqn.H (1.8 KB, 3 views)
File Type: h UEqn.H (570 Bytes, 3 views)
arnolnic 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
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 11:04
Formulation of the Radial Acutation Disk Source antar OpenFOAM Programming & Development 3 November 3, 2019 02:20
[PyFoam] and paraview eelcovv OpenFOAM Community Contributions 28 May 30, 2016 09:23
How to add X and Y forces at a point cgusty01 SU2 4 February 18, 2015 13:17
Radial Load calculation pump_passion CFX 3 March 31, 2010 17:51


All times are GMT -4. The time now is 15:40.