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

Could pressure gradient be modelled as "vectorCodedSource" in fvoptions at inlet

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 3, 2023, 16:28
Default Could pressure gradient be modelled as "vectorCodedSource" in fvoptions at inlet
  #1
Senior Member
 
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 17
chandra shekhar pant is on a distinguished road
Dear Foamers,
I am trying to see the effect of time varying effect of pressure gradient on the periodic channel in OpenFOAM v1906, thus wondering if, it is correct to use the
Code:
vectorCodedSource
at the inlet volume by creating a cellzone using inlet area \times deltax (streamwise direction resolution) in topoSetDict. If that is somehow mimicking the actual pressure gradient then I have following questions:
1. What should be the value of deltax for defining the cellzone in topoSetDict
2. What should be the magnitude of this source term in the
Code:
USource[celli] += vector(?, 0,0 )
should it be the exact value of dp/dx or something different.
Any comment/suggestion would be very much appreciated, many thanks in advance.
chandra shekhar pant is offline   Reply With Quote

Old   January 14, 2023, 09:21
Default
  #2
Senior Member
 
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 17
chandra shekhar pant is on a distinguished road
Hello All,
I guess I figured this out, so the basic principle is that the fully developed channel means that it's kind of steady state and the pressure gradient force is exactly balanced by the wall shear stress. So the body force to be applied inside the fvOptions is the magnitude of dpdx, now there are 2 questions:
1. Where should this force be applied and how?
2. What is the magnitude of this force and how it should be incorporated in the fvoptions?
Answers to the questions
1. Using topoSetDict create cellzone as:
Code:
/*--------------------------------*- C++ -*--------------------------------
actions
(

/// for creating volumetric force

{
        name 	source1;
        type	cellSet;
        action	new;
        source	boxToCell;
        box     (0 0 0) (Lx Ly Lz);
        
    }

    {
        name    source1;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set source1;
        }
    }
 );
After creating this zone, check if this is what is been expected using paraview:
1.
Code:
foamToVTK -cellSet source1
2. ParaFoam should be opened in the main case file
3. Through the existing opened paraFoam file, open the VTK and open the source1.vtk file on the top of the previous opened file so that we can see both the whole domain and the zone where we intend to apply the force.
2. For applying the body force using:
Code:
codedSource
{
    type            vectorCodedSource;
    selectionMode   cellZone;
    cellZone        source1;

    fields          (U);
    name            codedSource;
	// modified to include the pressure wave

	codeAddSup
    #{  
 forAll(cellsZone,i)
			{
        		const label celli = cellsZone[i];
        		
        		
        		USource[celli] -= vector(dpdx*V[celli], 0, 0 ); 
}
    #};

	
	
    
    codeCorrect
    #{
   
    #};
    codeConstrain
    #{
    #};  
    code
    #{
            $codeInclude
            $codeCorrect
            $codeAddSup
            $codeConstrain
    #};
    }
Then I checked the results from this procedure against the utility vectorSemiImplicitSource in fvoptions using:
Code:
pressureGradient
{
    type 		vectorSemiImplicitSource;
    selectionMode   all;
   volumeMode specific;    
    injectionRateSuSp
     { 
   U ((dpdx 0 0) 0);
    }
and got the exact answers.
chandra shekhar pant 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
Wind tunnel Boundary Conditions in Fluent metmet FLUENT 6 October 30, 2019 13:23
pimpleFoam in OF1612 shows same time step twice in log file shang OpenFOAM Bugs 10 January 24, 2018 11:43
pisoFOAM (LES) - internal pipe flow - convergence gu1 OpenFOAM Running, Solving & CFD 0 January 11, 2018 17:39
Pressure Inlet: question about total pressure I-mech FLUENT 0 July 13, 2014 06:38
help with boundary profile in pressure inlet quiqui FLUENT 21 June 18, 2013 13:55


All times are GMT -4. The time now is 18:47.