|
[Sponsors] |
Again on fixing the value of a variable in e certain volume of the domain |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 2, 2012, 10:11 |
Again on fixing the value of a variable in e certain volume of the domain
|
#1 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 18 |
Dear All,
what I am trying to do has been discussed, yet. Anyway, I am finding it a bit difficult to find a solution, since there are many threads about this question and I can not cope with them all. So, I would like to ask you, for help. What I wanna do is to edit the buoyantSimpleFoam solver, in order to fix the value of the temperature in a sub-volume of my domain. I have a mesh whit a volume patch which contains the cell I want to fix the T (or h) value. The problem I have to face first, are the following: a. in the solver we do not have T, but h. This is not a problem, since for a PIG it stands h = C_p*T, with C_p = const. Now, the question is: what are the next step? Following this tutorial I created my own solver buoyantSimpleFoam_Mod. I edited the file `files' in the Make directory and then I started editing the hEqn.H and the createFields files. Following this thread, I figured out that my hEqn.H file should looks like this: Code:
{ fvScalarMatrix hEqn ( fvm::div(phi, h) - fvm::Sp(fvc::div(phi), h) - fvm::laplacian(turbulence->alphaEff(), h) == fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p)) - p*fvc::div(phi/fvc::interpolate(rho)) ); hEqn.relax(); hEqn.setValues(hCells, hVals); hEqn.solve(); thermo.correct(); } One question that comes to my mind is: where should I define these 2 vectors? And how? Also, is it possible to insert the label of the volume patch, instead of the label of each cell? Fuerthermore, I guess that I have to change the file fvSolution in the case/system directory and I think that it is enough to add the following line: Code:
hCells 0; sVals 1000; Could anyone help, please? Thanks a lot, Samuele Last edited by samiam1000; March 2, 2012 at 10:40. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error message: Insufficient Catalogue Size | Paresh Jain | CFX | 32 | February 3, 2021 03:37 |
[blockMesh] BlockMesh FOAM warning | gaottino | OpenFOAM Meshing & Mesh Conversion | 7 | July 19, 2010 14:11 |
[blockMesh] Solid volume inside computational domain | francois | OpenFOAM Meshing & Mesh Conversion | 7 | November 19, 2008 16:11 |
How to compute total liquid volume of the whole domain | hsieh | OpenFOAM Post-Processing | 2 | July 13, 2007 18:18 |
Multi_component Vs Additional Variable | Anurag | CFX | 2 | February 4, 2005 16:45 |