|
[Sponsors] |
Heat source in a particular region inside the fluid domain |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 2, 2010, 02:31 |
Heat source in a particular region inside the fluid domain
|
#1 |
Member
Robin Gilbert
Join Date: Jan 2010
Posts: 66
Rep Power: 16 |
Hi i want to add a heat source inside a small region in a fluid domain. i added a heat source term in TEqn.H and it works fine for the whole region. But i want to impose a condition that the heat source gets activated inside a small control volume. i have been reading up a lot but cant figure out how to go about doing it. if atleast someone can tell me where to start, I will figure it out. how do i give an if-else condition to check if it is solving the domain i need to add the source term.
i tried the following in the createFields.H Code:
volScalarField x = mesh.C().component(vector::X); volScalarField y = mesh.C().component(vector::Y); volScalarField z = mesh.C().component(vector::Z); forAll(x,celli) { if(x[celli] >= 1 && y[celli] >= 1 && z[celli] >= 2.2 && x[celli] <= 1.5 && y[celli] <= 1.5 && z[celli] <= 2.5) { dimensionedScalar Q ( "Q", dimensionSet(1,-1,-3,0,0,0,0), scalar(5000) ); }else { dimensionedScalar Q ( "Q", dimensionSet(1,-1,-3,0,0,0,0), scalar(1000) ); } } Thanks. |
|
Tags |
heat source, if-else |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Simulation of a single bubble with a VOF-method | Suzzn | CFX | 21 | January 29, 2018 00:58 |
Constant velocity of the material | Sas | CFX | 15 | July 13, 2010 08:56 |
How can I increase Heat Transfer at Domain Interf? | B.Simon | CFX | 3 | October 28, 2008 18:53 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 17:51 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 15:55 |