|
[Sponsors] |
April 30, 2011, 17:15 |
|
#21 |
Senior Member
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22 |
Hi Jeff,
add this snippet to an appropriate place in your code, for example in createFields.H: Code:
label TRefCell = 0; scalar TRefValue = 0.0; setRefCell(T, mesh.solutionDict().subDict("PISO"), TRefCell, TRefValue); Code:
PISO { . . . //TRefCell 0; // <--- definition via cell label TRefPoint (0 0 0); // <--- definition via coordinates TRefValue 1000; . . . } |
|
May 30, 2011, 20:30 |
|
#22 |
Senior Member
jeff osborne
Join Date: Mar 2010
Posts: 108
Rep Power: 16 |
Update to this old thread:
Upon playing with this it didn't do it quite as i wanted. I'm not sure what it was doing but it wasn't keeping my temperature at 1 value, it was changing in time. So what I did is made my TEqn.H file read as follows: Code:
/************************** solve ( fvm::ddt(T) + fvm::div(phi, T) - fvm::laplacian(DT, T) ); **************************/ { fvScalarMatrix TEqn ( fvm::ddt(T) + fvm::div(phi, T) - fvm::laplacian(DT,T) ); point TRefPoint(2, 0, 0); // metres label TRefCell = mesh.findCell(TRefPoint); Info<< "TRefCell = " << TRefCell << nl << "TRefValue = " << TRefValue << nl << endl; // create a labelList containing only the label TRefCell labelList fixedCells(1, TRefCell); // create a field having as many values as the labelList, // specifically the values we want to set scalarField fixedValues(fixedCells.size(), TRefValue); // set the values. This eliminates the specified cells from the matrix TEqn.setValues(fixedCells, fixedValues); TEqn.solve(); } Jeff |
|
February 24, 2012, 06:56 |
|
#23 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19 |
Hi there,
I am writing since I am facing the problem you had and discussed about in this thread. I am running a simulation and - in a certain area of my domain - I want to impose a fixed temperature. Let's say that I want to impose a boundary condition in a volume and not on a surface. The solver I am using is buoyantSimpleFoam and I do not know which is the file that I need to edit. Thanks a lot, Samuele Last edited by samiam1000; February 24, 2012 at 10:12. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cell Reynolds Number | laliong | Main CFD Forum | 12 | September 17, 2019 04:18 |
incorrect temperature in pressure based solution | Kian | FLUENT | 1 | July 6, 2009 06:59 |
Fixed temperature for domain | seojaho | CFX | 8 | June 4, 2009 14:21 |
Ultra high temperature? | bk | Siemens | 2 | July 19, 2005 01:01 |
Cell Temperature using udf | Karthick | FLUENT | 2 | April 19, 2004 07:29 |