|
[Sponsors] |
September 2, 2021, 05:43 |
coded source nerver used
|
#1 |
Member
Yann Guyot
Join Date: Feb 2019
Posts: 37
Rep Power: 7 |
Dear all,
I am writing this message since I am struggling with an issue. I want to add steam in my buoyantsimpleFoam simulations. For this I added a scalartransport term in the controldict. I want to have the source (a specific volume in the mesh) dependent on the computed temperature T, so I used the scalarCodedSource f in the fvOptions. No error is coming out, the problem is that the coded source term is not taken into account. Here is the codes I used, I know the toposet defining my source volume is working fine since it is also a source term for heat and this part works fine. output : Code:
OAM Warning : From function virtual void Foam::fv::option::checkApplied() const in file cfdTools/general/fvOptions/fvOption.C at line 125 Source steam defined for field H2O but never used controlDict : Code:
functions { steam { type scalarTransport; functionObjectLibs ("libsolverFunctionObjects.so"); field H2O; writeControl timeStep; schemesField k; writeInterval 1; resetOnStartUp false; autoSchemes true; } } fvOptions: Code:
steam { type scalarCodedSource; active yes; name sourceTime; scalarCodedSourceCoeffs { selectionMode cellSet; cellSet Porosity; fields (H2O); codeInclude #{ #}; codeCorrect #{ #}; codeAddSup #{ const volScalarField& Tm = mesh_.lookupObject<volScalarField>("T"); const volScalarField Tcc = Tm.mesh().C() & vector(1,1,1); const scalarField& V = mesh_.V(); scalarField& H2OSource = eqn.source(); const labelList& cellIDs = cells(); forAll(cellIDs, i) { label cellI = cellIDs[i]; H2OSource[cellI] = -0.00000245*(HEATBROILER-(0.61*HEATBROILER*(1000+20*(20-(Tm[cellI]-273.15)))/1000-(0.228/1000)*(Tm[cellI]-273.15)*(Tm[cellI]-273.15)))*DENSITY/0.3*V[cellI]; } #}; codeSetValue #{ #}; } sourceTimeCoeffs { $scalarCodedSourceCoeffs; } } Thank you very much for any help Yann |
|
February 13, 2022, 15:43 |
same problem
|
#2 |
New Member
manou mouna
Join Date: Jan 2022
Posts: 7
Rep Power: 4 |
Hi Yann, I have the same problem did you solve it please???
|
|
February 13, 2022, 16:52 |
|
#3 | |
Member
MNM
Join Date: Aug 2017
Posts: 69
Rep Power: 8 |
Quote:
Have you tried Code:
active true; Code:
active yes; Code:
H2OSource[cellI] = -0.00000245*(HEATBROILER-(0.61*HEATBROILER*(1000+20*(20-(Tm[cellI]-273.15)))/1000-(0.228/1000)*(Tm[cellI]-273.15)*(Tm[cellI]-273.15)))*DENSITY/0.3*V[cellI]; Code:
H2OSource[cellI] += -0.00000245*(HEATBROILER-(0.61*HEATBROILER*(1000+20*(20-(Tm[cellI]-273.15)))/1000-(0.228/1000)*(Tm[cellI]-273.15)*(Tm[cellI]-273.15)))*DENSITY/0.3*V[cellI]; |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom Thermophysical Properties | wsmith02 | OpenFOAM | 4 | June 1, 2023 14:30 |
[OpenFOAM.com] swak4foam compiling issues on a cluster | saj216 | OpenFOAM Installation | 5 | January 17, 2023 16:05 |
what is swap4foam ?? | AB08 | OpenFOAM | 28 | February 2, 2016 01:22 |
[swak4Foam] Error bulding swak4Foam | sfigato | OpenFOAM Community Contributions | 18 | August 22, 2013 12:41 |
friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 10:57 |