|
[Sponsors] | |||||
internalField nonuniform list issues (on alpha.* / phase initialization) |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
New Member
Markus S.
Join Date: Jan 2025
Posts: 2
Rep Power: 0 ![]() |
Hey there,
I'm trying to make use of a multiphase simulation (via interFoam) in OpenFoam 10. Before, I try to initilize different phases on the mesh. I specified the phases in "0" directory as well as the setFieldsDict. Then I run setFields function (after generating mesh of course). The file alpha.* should be edited and must now contain a list of zeros and ones under the entry internalField. (I'm just using 2 phases here) So, here is an example of what I would expect: Code:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format binary;
class volScalarField;
location "0";
object alpha.methanol;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField nonuniform List<scalar>
32400
(0
1
1
0
1
1
1
0
0
...
)
...
Code:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format binary;
class volScalarField;
location "0";
object alpha.methanol;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField nonuniform List<scalar>
32400
(^@^@^@^@^@^@�?^@^@^@^@^@^@�?^@^@^@^@^@^@�?^@^@^@^@^@^@�?^@^@^@^@^@^@�?^@^@^@^@^@^@�?^@^@^@^@
...
Code:
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 10
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
Build : 10-c4cf895ad8fa
Exec : setFields
Date : Jan 08 2025
Time : 14:37:39
Host : "DESKTOP-NGKFP5B"
PID : 40467
I/O : uncollated
Case : [...]
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Create mesh for time = 0
Reading "setFieldsDict"
Setting field default values
Setting internal values of volScalarField alpha.methanol
Setting field region values
Adding cells with center within boxes 1((0 0 -1) (0.001 0.00025 1))
Setting internal values of volScalarField alpha.methanol
End
The entry is valid anyway since I am able to call interFoam and calculate the case. Also, I can see the initilized phases in Paraview. Does anybody faced the same issue? Is there a "fix" or why it is appearing like this? Looking forward to your replys Cheers Markus |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
|
Hi Markus,
The file has been written in binary format, so it is easily read by the computer, but not so much by a human. If you would change the controlDict to have Code:
writeFormat ascii; However, these files will be bigger and less accurate (depending on writePrecision), so I would recommend leaving it to binary. For testing/checking purposes, ascii can be used of course. Regards, Tom |
|
|
|
|
|
|
|
|
#3 |
|
New Member
Markus S.
Join Date: Jan 2025
Posts: 2
Rep Power: 0 ![]() |
Hi Tom,
Thanks for your reply. That’s pretty much what I thought. And yes, it’s mainly for a test case configuration. I can also check it in ParaView, where it’s displayed correctly. However, I was just curious whether this behavior is intentional or not. Also, thanks for the hint about ASCII formatting—that’ll definitely help for now. Cheers, Markus |
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| issues when using nonuniform List at inlet | haow | OpenFOAM Pre-Processing | 0 | July 2, 2018 14:33 |
| Issues with symmetry patches perpendicular to outlets | sturgeon | OpenFOAM Running, Solving & CFD | 2 | October 9, 2017 10:46 |
| Issues with volume of fluid in three phase simulation | hooman.esl | FLUENT | 0 | July 17, 2017 08:30 |
| [Other] How to use finite area method in official OpenFOAM 2.2.0? | Detian Liu | OpenFOAM Meshing & Mesh Conversion | 4 | November 3, 2015 04:04 |
| [foam-extend.org] problem when installing foam-extend-1.6 | Thomas pan | OpenFOAM Installation | 7 | September 9, 2015 22:53 |