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

interFoam Error while running case on Sloshing Dynamics

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 19, 2024, 07:41
Exclamation interFoam Error while running case on Sloshing Dynamics
  #1
New Member
 
Join Date: Jun 2023
Posts: 16
Rep Power: 3
kazzy is on a distinguished road


Attached the snippet of error message poping out while running case on Sloshing dynamics. Solver used is interFoam. Please suggest further on this. Your help is much appreciated.


Link: https://ibb.co/8mHB6TT

Last edited by kazzy; April 1, 2024 at 07:34. Reason: No response
kazzy is offline   Reply With Quote

Old   April 10, 2024, 07:01
Default
  #2
Member
 
MNM
Join Date: Aug 2017
Posts: 69
Rep Power: 9
SHUBHAM9595 is on a distinguished road
Hi Kazzy,

I hope you have already resolved ur issue. If not simply add the following lines in your constant/fvOptions file.
Code:
 19     alpha.water
 20     {
 21         nAlphaCorr      1;
 22         nAlphaSubCycles 3;
 23         cAlpha          1.5;
 24     }
SHUBHAM9595 is offline   Reply With Quote

Old   April 16, 2024, 09:02
Exclamation Sloshing Dynamics
  #3
New Member
 
Join Date: Jun 2023
Posts: 16
Rep Power: 3
kazzy is on a distinguished road
Hello,

Thanks for responding to my query. However, I am still not able to run the solver using interFoam. Please check below error message:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: solidBody
Applying motion to entire mesh
Selecting solid-body motion function oscillatingLinearMotion

PIMPLE: Operating solver in PISO mode

Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

Reading transportProperties



--> FOAM FATAL IO ERROR: (openfoam-2306)
Size 38100 is not equal to the expected length 107400

file: 0/alpha.water.internalField at line 19.

From void Foam::Field<Type>::assign(const Foam::entry&, Foam::label) [with Type = double; Foam::label = int]
in file /home/karan/OpenFOAM/OpenFOAM-v2306/src/OpenFOAM/lnInclude/Field.C at line 253.

FOAM exiting
kazzy is offline   Reply With Quote

Old   April 17, 2024, 07:12
Default
  #4
Member
 
MNM
Join Date: Aug 2017
Posts: 69
Rep Power: 9
SHUBHAM9595 is on a distinguished road
Hi kazzy,

Based on the error info
HTML Code:
Size 38100 is not equal to the expected length 107400
it seems you are either
using a old mesh and new alpha (from setFields)
or
using a new mesh and old alpha (from setFields)


The easy way is to just execute
1) foamCleanPolyMesh
2) blockMesh (assuming you are generating your grid from blockMesh)
3) setField -time 0
and then proceed with your solver
SHUBHAM9595 is offline   Reply With Quote

Old   April 23, 2024, 09:01
Exclamation
  #5
New Member
 
Join Date: Jun 2023
Posts: 16
Rep Power: 3
kazzy is on a distinguished road
FoamFile
{
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

defaultFieldValues
(
volScalarFieldValue alpha.water.orig 1
);

regions
(
boxToCell
{
box (-1 -1 0 ) (1 1 0.453 ); //****Insert here coordinate of box that includes cells to refine****

fieldValues (volScalarFieldValue alpha.water.orig 1 ); //****Insert here name and value of field to set****
}
);


// ************************************************** *********************** //

Above is my setFieldsDict

Please check as I am getting same error message even after running your suggested scripts.

''Size 38100 is not equal to the expected length 15000''
kazzy is offline   Reply With Quote

Old   April 23, 2024, 16:42
Default
  #6
Member
 
MNM
Join Date: Aug 2017
Posts: 69
Rep Power: 9
SHUBHAM9595 is on a distinguished road
Hi Kazzy,

I think the problem is somewhere else. I'm not sure if alpha.water.orig is the correct syntax for your case in the setFieldsDict
Code:
boxToCell
{
box (-1 -1 0 ) (1 1 0.453 ); //****Insert here coordinate of box that includes cells to refine****

fieldValues (volScalarFieldValue alpha.water.orig 1 ); //****Insert here name and value of field to set****
}

I just did a quick search within $FOAM_TUTORIALS and could NOT find a single entry for "alpha.water.orig". If I'm not wrong the correct one should be just alpha.water
SHUBHAM9595 is offline   Reply With Quote

Reply

Tags
interfoam, sloshing


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
Problem running my case OF2.4 vs OF2.3.1 Zinedine OpenFOAM Running, Solving & CFD 2 March 15, 2016 05:56
Statically Compiling OpenFOAM Issues herzfeldd OpenFOAM Installation 21 January 6, 2009 10:38
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 13:24
InterFoam problem running parallel vatant OpenFOAM Running, Solving & CFD 0 April 28, 2006 20:22
How to save a case running in background us FLUENT 0 July 6, 2005 11:43


All times are GMT -4. The time now is 14:56.