CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

writing volScalarField

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By einstein_zee

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 10, 2025, 10:44
Default writing volScalarField
  #1
New Member
 
Join Date: Oct 2024
Posts: 13
Rep Power: 2
ah_9 is on a distinguished road
Hi,


I am working with the twoPhaseEulerFoam solver and also using kineticTheoryModels. I want to observe the thermal conductivity "kappa" which is already defined as IOobject but in the file kineticTheoryModel.C as :


kappa_
(
IOobject
(
IOobject::groupName("kappa", phase.name()),
U.time().timeName(),
U.mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
U.mesh(),
dimensionedScalar("zero", dimensionSet(1, -1, -1, 0, 0), 0.0)
)


Now I want to view this being written to case files, just like the other volScalarFields, so I changed the NO_WRITE to AUTO_WRITE and compiled my code. But it doesn't seem to do anything.



Furthermore, if I try to print something by adding a "Info<<.." statement, I don't observe it in my log fiile.


Is there a problem with my compilation? (I do wmake) or what is the other way I can observe kappa?

Any help would be appreciated! Thanks in advance
ah_9 is offline   Reply With Quote

Old   January 12, 2025, 12:21
Default writing intermediate quantities in OF
  #2
Member
 
Hosein
Join Date: Nov 2011
Location: Germany
Posts: 96
Rep Power: 15
einstein_zee is on a distinguished road
Hi there,

try adding
Code:
  writeKappa
    {
        type        writeObjects;
        libs        (utilityFunctionObjects);
        objects     (kappa.particles);
        writeControl timeStep;
        writeInterval 1;
    }
to your controlDict functions section. Still in doubt ? check this video out https://youtu.be/LXUudKkjNRY
Tobermory likes this.
einstein_zee is offline   Reply With Quote

Old   January 13, 2025, 05:01
Default
  #3
New Member
 
Join Date: Oct 2024
Posts: 13
Rep Power: 2
ah_9 is on a distinguished road
Dear einstein_zee,



Thankyou so much!!

However I can't get the fields that I want at the correct time intervals. But that I can play around with


Thanks a lot
ah_9 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] SnappyHexMesh/splitMeshRegion : region1 in zone "-1" GuiMagyar OpenFOAM Meshing & Mesh Conversion 3 August 4, 2023 13:38
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38
Error message Bruno_Jorge Main CFD Forum 1 February 5, 2019 12:12
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
[snappyHexMesh] crash sHM H25E OpenFOAM Meshing & Mesh Conversion 11 November 10, 2014 12:27


All times are GMT -4. The time now is 12:23.