|
[Sponsors] |
New boundary condition implementation for 1D-baffles using codeStream. |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 4, 2018, 05:56 |
New boundary condition implementation for 1D-baffles using codeStream.
|
#1 |
Member
Marco Bernardes
Join Date: May 2009
Posts: 57
Rep Power: 16 |
Hi,
I'm trying to implement a new boundary condition for 1D-baffles using codeStream. The BC should read the neighbor cells of an internal 1D-baffle and verify if the temperature at the left-hand side is greater than the temperature at the right-hand side. If yes, the baffle's temperature should be set equal to the temperature at the neighbor cells. If not, the BC should not work. I'm trying to induce a unidirectional conductive heat flow for a Laplacian solver. I could already start the programming but I don't know how to go further. How can I read the temperature from the neighbor cells? Is it possible to set the heat flux equal to zero? Thanks in advance! Marco. plate { type fixedValue; value #codeStream { codeInclude #{ #include "fvCFD.H" #include "faceList.H" #}; codeOptions #{ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude #}; //libs needed to visualize BC in paraview codeLibs #{ -lmeshTools \ -lfiniteVolume #}; code #{ const IOdictionary& d = static_cast<const IOdictionary&> ( dict.parent().parent() ); const fvMesh& mesh = refCast<const fvMesh>(d.db()); const label id = mesh.boundary().findPatchID("plate"); const fvPatch& patch = mesh.boundary()[id]; scalarField T(patch.size(), scalar(273)); forAll(T, i) { T[i] = scalar(777); } T.writeEntry("", os); #}; }; } Last edited by masb; June 5, 2018 at 03:03. |
|
Tags |
boundaries condition, codestream; setfields; |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question about adaptive timestepping | Guille1811 | CFX | 25 | November 12, 2017 17:38 |
several fields modified by single boundary condition | schröder | OpenFOAM Programming & Development | 3 | April 21, 2015 05:09 |
CFX fails to calculate a diffuser pipe flow | shenying0710 | CFX | 7 | March 26, 2013 04:13 |
External Radiation Boundary Condition for Grid Interface | CFD XUE | FLUENT | 0 | July 9, 2010 02:53 |
External Radiation Boundary Condition (Two sided wall), Grid Interface | CFD XUE | FLUENT | 0 | July 8, 2010 06:49 |