|
[Sponsors] |
January 9, 2014, 09:00 |
writing radiation source term in fireFoam
|
#1 |
New Member
Join Date: Feb 2012
Posts: 25
Rep Power: 14 |
In fireFoam solver, the radiation source term is included in hs equation ..file YhsEqn.H as follows:
fvScalarMatrix hsEqn ( fvm::ddt(rho, hs) + mvConvection->fvmDiv(phi, hs) - fvm::laplacian(turbulence->alphaEff(), hs) == DpDt + dQ + radiation->Shs(thermo) + parcels.Sh(hs) + surfaceFilm.Sh() ); I want to write out the radiation source term 'radiation->Shs(thermo)'. Can someone tell what changes should I make in the fireFoam solver to write the radiation source term. |
|
January 9, 2014, 19:03 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
You have to add a new field (probably in createFields.H) which is written every timestep. Then copy radiotion-Shs(thermo) to this field before the timestep is finished.
|
|
January 13, 2014, 18:49 |
|
#3 |
Member
赵庆良
Join Date: Aug 2013
Posts: 56
Rep Power: 13 |
Hi Marshak,
I have the some problem with you!I also want to write out the radiation source term 'radiation->Shs(thermo)'.Have you solved it?If it is solved,could tell how to do it?Thanks in advance! |
|
January 13, 2014, 19:49 |
|
#4 |
New Member
Join Date: Feb 2012
Posts: 25
Rep Power: 14 |
'jhreb' I tried with createfields.H but it is not working...
|
|
January 14, 2014, 05:39 |
|
#5 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
Here is what I did in a comparable case:
Add a new field to createFields.H Code:
volScalarField Shs( IOobject ( "Shs", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE // this tells OpenFOAM to store the field after each timestep ), dimensionedScalar("zero", dimensionSet(0, 0, 1, 0, 0), 0.0) // here you have to set the correct dimensions of your field ); Code:
if (pimple.finalIter()) { Shs = radiation->Shs(thermo); } |
|
January 16, 2014, 07:19 |
related question in another thread
|
#6 |
Member
Join Date: Nov 2011
Location: Berlin
Posts: 31
Rep Power: 15 |
Hello,
fyi I put a related radiation question to another thread http://www.cfd-online.com/Forums/ope...blem-5.html#99 thanks dirk |
|
January 16, 2014, 10:51 |
|
#7 |
New Member
Join Date: Feb 2012
Posts: 25
Rep Power: 14 |
Shs() in radiation::radiationModel is defined as fvScalarMatrix. How can a fvScalarmatrix be written as a volScalarField?
|
|
January 17, 2014, 12:03 |
|
#8 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
You are right. I my case what I really used was something like
Code:
rHS1 = fvc::reconstruct ( ( - ghf*fvc::snGrad(rho) ) * mesh.magSf() ); Code:
if (pimple.finalIter()) { Info<< radiation->Sh(thermo); } I didn't test it, but it is probably possible to assign these diagonal elements to an volume scalar field, which could be written to disk and then loaded into Paraview. |
|
March 13, 2018, 07:02 |
|
#9 |
New Member
David Barreiro
Join Date: Jul 2017
Posts: 2
Rep Power: 0 |
Hi everyone!
I've got a similar problem with a modification of the kinematicSingleLayer model for reactingParcelFilFoam. I added a pressure term to model the surface tension and it's working quite well. The problem is that I want to visualize this term and I'm not being able to save it. I've tried to modify the original NO_WRITE for AUTO_WRITE but it doesn't work. Any idea?? Code:
tmp<volScalarField> myKinematicSingleLayer::pu() { return tmp<volScalarField> ( new volScalarField ( IOobject ( typeName + ":pu", time_.timeName(), regionMesh(), IOobject::NO_READ, IOobject::AUTO_WRITE ), pPrimary_ // pressure (mapped from primary region) - pSp_ // accumulated particle impingement - fvc::laplacian(sigma_, delta_) // surface tension - sigma_/hDisj_*(cos(theta_/180*3.141593)-1)*exp(-delta_/hDisj_) //Disjoining pressure ) ); } David |
|
March 23, 2019, 07:23 |
|
#10 | |
New Member
Madeleine Combrinck
Join Date: Jan 2011
Posts: 2
Rep Power: 0 |
Quote:
Dear David, Did you find a solution to this? I am attempting to write out a source term and got stuck. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem of SOURCE term gradient in UDS | wind | Fluent UDF and Scheme Programming | 6 | December 1, 2022 15:21 |
[Other] OpenFOAM Installation for navalFoam | sachinlb | OpenFOAM Community Contributions | 22 | July 28, 2017 06:26 |
centOS 5.6 : paraFoam not working | yossi | OpenFOAM Installation | 2 | October 9, 2013 02:41 |
[swak4Foam] funkySetFields compilation error | tayo | OpenFOAM Community Contributions | 39 | December 3, 2012 06:18 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 02:24 |