CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

How to store a field in a new varianle and see it in paraFoam?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 2, 2022, 00:46
Default How to store a field in a new varianle and see it in paraFoam?
  #1
Member
 
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 5
saicharan662000@gmail.com is on a distinguished road
Hello guys,
I am trying to assign alpha1 values to a variable A in compressibleInterFoam solver.
So I added a subroutine in createFields.H like this


Code:
volScalarField A
    (
    IOobject
        (
         "A",
         mesh.time().timeName(),
         mesh,
         IOobject::MUST_READ,
         IOobject::AUTO_WRITE
        ),
        mesh,
      dimensionedScalar("zero", dimless, 0.0)  
    );
A.ref() = mixture.alpha1();
But I could see alpha1 at first time step only. Later field is disappearing for remaining time steps.
Can anyone help me with this?
saicharan662000@gmail.com is offline   Reply With Quote

Old   March 2, 2022, 19:15
Default
  #2
Member
 
MNM
Join Date: Aug 2017
Posts: 69
Rep Power: 9
SHUBHAM9595 is on a distinguished road
Hi Hari,

Can u see this new field in your intermediate time folders ? If yes, then something might be wrong with the OpenFOAM plugin of paraview. As an alternative try loading files via foamToVTK and then it should work.
SHUBHAM9595 is offline   Reply With Quote

Old   March 3, 2022, 00:10
Default
  #3
Member
 
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 5
saicharan662000@gmail.com is on a distinguished road
Hello shubham,
Can you tell me How to load these files to vtk?
Thanks for your reply
saicharan662000@gmail.com is offline   Reply With Quote

Old   March 3, 2022, 15:31
Default
  #4
Member
 
MNM
Join Date: Aug 2017
Posts: 69
Rep Power: 9
SHUBHAM9595 is on a distinguished road
Just Execute
Code:
foamToVTK
command in the home folder (where u hav your 0/ constant/ & system/ directory) ...this will by default write all the fields at all the time steps....open paraview (by
Code:
paraview
command) instead of paraFoam (as the issue might be from the FOAM's plugin of paaraview). Now File > Open > choose supported format - legacy VTK format....and then open the YOUR_TEST_CASE.vtk file
SHUBHAM9595 is offline   Reply With Quote

Old   March 3, 2022, 23:41
Default accessing alpha.water with a new variable.
  #5
Member
 
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 5
saicharan662000@gmail.com is on a distinguished road
Hello shubam,
I am attaching a pic so that u can see what's actually my problem is?
ALPHA1 which I named as "A" is staying the same through out the runtime.
Thanks for the reply
Attached Images
File Type: png Screenshot from 2022-03-04 09-10-02.png (13.3 KB, 1 views)
saicharan662000@gmail.com is offline   Reply With Quote

Reply

Tags
compressibleinterfoam, openfoam, openfoam8, postprocess


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



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