|
[Sponsors] |
July 5, 2020, 23:19 |
coded source term in fvOptions
|
#1 |
Senior Member
KGN
Join Date: Oct 2009
Location: Chennai, India
Posts: 121
Rep Power: 17 |
Hi all,
I am trying to implement local source based model to replace "effusion hole" in combustor liners with source and sink model. (details in the attached image) I want to know how to get pressure value at a certain grid points to calculate the pressure drop across the hole and then calculate the discharge coefficient, to apply mass flow rate at hole center |
|
July 10, 2020, 07:31 |
|
#2 |
Senior Member
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 369
Rep Power: 8 |
you can define a little box at the area where you want to measure your pressure with topoSetDict. you need to create a cellZone. you can then access the cells and calculate a pressure average, i don't think that you will be able to create a box as little as a cell. so small enough with averaged pressure should be feasible.
|
|
September 1, 2020, 05:51 |
|
#3 |
Senior Member
KGN
Join Date: Oct 2009
Location: Chennai, India
Posts: 121
Rep Power: 17 |
Code:
massSourceEffusionHole { type scalarCodedSource; name sourceTime; active true; scalarCodedSourceCoeffs { fields (rho); selectionMode points; points //sink location ( (0.035 0.034 0.0) ); codeInclude #{ #}; codeCorrect #{ #}; codeAddSup #{ const Time& time1 = mesh().time(); const volScalarField& rhoJet = mesh_.lookupObject<volScalarField>("rho"); const volVectorField& velJet = mesh_.lookupObject<volVectorField>("U"); scalarField& massSource1 = eqn.source(); const labelList& cellIDs = cells(); forAll(cellIDs, i) { label cellI = cellIDs[i]; massSource1[cellI] = rhoJet[cellI]*mag(velJet[cellI])*6.28319*1e-6; } #}; codeSetValue #{ #} // Dummy entry. Make dependent on above to trigger recompilation code #{ $codeInclude $codeCorrect $codeAddSup $codeSetValue #}; } sourceTimeCoeffs { $scalarCodedSourceCoeffs; } } I need help in applying the MFR calculated at "sink" location to "source" location i.e. (0.0385 0.0365 0.0) FYI sink location (0.035 0.034 0.0) source location (0.0385 0.0365 0.0) Thanks KGN |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to add Source term (2) for PYROLYSIS - reactingOneDim | Kummi | OpenFOAM | 10 | April 12, 2021 22:11 |
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 | tlcoons | OpenFOAM Installation | 13 | April 20, 2016 18:34 |
Using fvOptions to add a momentum source | wallace | OpenFOAM Programming & Development | 9 | December 9, 2015 11:41 |
[Other] How to use finite area method in official OpenFOAM 2.2.0? | Detian Liu | OpenFOAM Meshing & Mesh Conversion | 4 | November 3, 2015 04:04 |
SparceImage v1.7.x Issue on MAC OS X | rcarmi | OpenFOAM Installation | 4 | August 14, 2014 07:42 |