|
[Sponsors] |
May 29, 2024, 15:26 |
Defining power distribution to a region
|
#1 |
New Member
george
Join Date: Feb 2021
Posts: 16
Rep Power: 5 |
Hello,
Below, there is a power distribution that varies only with height for a solid channel. 1)Since we are defining enthalpy, is the energy generation for each cell defined in Joules or Joules per kilogram? If it is in Joules per kilogram, does it require any changes in fvOptions? 2)Why is source[i] -= Equation used in the syntax instead of source[i] = Equation even though there is no increase or decrease over time? Also, when I change it to source[i] += Equation, no power generation occurs. 3)Despite having a constant defined power value for each cell in the first iteration, why do the expected temperatures occur after a certain iteration? Could it be due to the initial conditions? Code:
powerDist { type scalarCodedSource; name PS; scalarCodedSourceCoeffs { selectionMode cellZone; cellZone solidRegion; fields (h); codeInclude #{ #}; codeCorrect #{ #}; codeAddSupRho #{ const scalarField& zAx = mesh_.C().component(2); //const scalarField& cellVolumes = mesh_.V(); scalarField& source = eqn.source(); forAll(zAx, i) { scalar zValue = zAx[i]; //scalar cellVolume = cellVolumes[i]; scalar eqq = sin(zValue); // long polynomial source equation source[i] -= eqq; } #}; codeConstrain #{ #}; } } scfd Last edited by scfd; June 5, 2024 at 08:43. Reason: grammer |
|
Tags |
fvoptions, power, source |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with chtMultiregionFoam radiation boundary condition | baran_foam | OpenFOAM Running, Solving & CFD | 10 | December 17, 2019 18:36 |
Defining the region between two layers of fluid in a reacting flow | bamidoao | FLUENT | 0 | February 15, 2017 22:49 |
Taking too much for run | Grimoli | OpenFOAM Running, Solving & CFD | 5 | November 26, 2013 21:07 |
Variable distribution over a Region | LittleBart | CFX | 1 | August 7, 2011 19:52 |
Defining wall boundary region | saleem | Siemens | 3 | August 31, 2005 04:58 |