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

reading .dat file in tanksloshing2d

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 28, 2011, 11:27
Default reading .dat file in tanksloshing2d
  #1
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
IN InterDyMFoam, the tanksolshing for 6 degree of freedom can read a data file with extension .dat. Can the same be done for the 2d tank?
musahossein is offline   Reply With Quote

Old   October 1, 2011, 15:41
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings musahossein,

My experience with the "DyM" type solvers is limited, but I think it should work with 2D models as well, similarly to the traditional cavity tutorial; the ".dat" file should only make moves in X and Y, without any moves in Z, otherwise you're going to have problems...

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 16, 2011, 11:00
Default Cannot read data file for 2D Tanksloshing in interDyMFoam
  #3
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Thanks for your suggestion. I tried to run the 2D Tanksloshing file by making the following changes to the dynamicMeshDict file, for lack of better information.

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh solidBodyMotionFvMesh;

solidBodyMotionFvMeshCoeffs
{
solidBodyMotionFunction tabulated2DoFMotion;
tabulated2DoFMotionCoeffs
{
CofG ( 0 0 0 );
timeDataFileName "$FOAM_CASE/constant/2DoF.dat";
}
}

Upon running, I get the following error log:

Build : 2.0.1-51f1de99a4bc
Exec : interDyMFoam
Date : Oct 16 2011
Time : 10:42:21
Host : musa-Satellite-M35X
PID : 4701
Case : /home/musa/OpenFOAM/musa-2.0.1/run/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create mesh for time = 0

Selecting dynamicFvMesh solidBodyMotionFvMesh
Selecting solid-body motion function tabulated2DoFMotion


--> FOAM FATAL ERROR:
Unknown solidBodyMotionFunction type tabulated2DoFMotion

Valid solidBodyMotionFunctions are :

7
(
SDA
linearMotion
multiMotion
oscillatingLinearMotion
oscillatingRotatingMotion
rotatingMotion
tabulated6DoFMotion
)


From function solidBodyMotionFunction::New( const dictionary& SBMFCoeffs, const Time& runTime)
in file solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C at line 52.

FOAM exiting

I am not surprised - since I have tried to use the commands in the dynamicmeshDict file for the 3D 6DoF file. OpenFoam gives several options in the solid body motion function as shown above. Can any of those be used when trying to read a 2d data file?

Thanks
musahossein is offline   Reply With Quote

Old   October 16, 2011, 12:19
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi musahossein,

Try using "tabulated6DoFMotion", but like I tried to say, set all of the other degrees of motion to 0.00000.

In other words: don't forget that in OpenFOAM 2D is in fact 3D, but with a single cell in one of the directions, along with the definition of "type empty;" on both sides of that direction. I suppose you are already familiar with this, but just in case see the first tutorial in the user guide: www.openfoam.com/docs/user/cavity.php

Now, when you've got said pseudo-2D geometry, you probably can still use the "tabulated6DoFMotion" mesh motion, simply because your 2D mesh is set in a 3D space! And by setting to "0.000" the table entries related to the 3rd dimension, you'll get a 2D motion!

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 17, 2011, 21:26
Default is end time in controldict in interDyMFoam overwritten by .dat file?
  #5
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
In the control dict file for Tanksloshing2D end time is given as 40. If I am having a data file read, instead of using SDA to provide all the parameters, where the time ends at 3.6 seconds, then is the end time in the control dict file over ridden? Comments appreciated!
musahossein is offline   Reply With Quote

Old   October 18, 2011, 17:29
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi musahossein,

  • "controlDict" dictates the simulation time.
  • The mesh motion data specifies the known relation between time and space.
  • Therefore:
    • If the motion data has 40s, but you only simulate 3.6s, then only 3.6s are simulated.
    • If the motion data has 3.6s, but you try to simulate 40s, then it will crash/stop simulating at 3.6s and complain about the missing information.
I hope this answers your question!

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 18, 2011, 20:15
Default
  #7
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi musahossein,

  • "controlDict" dictates the simulation time.
  • The mesh motion data specifies the known relation between time and space.
  • Therefore:
    • If the motion data has 40s, but you only simulate 3.6s, then only 3.6s are simulated.
    • If the motion data has 3.6s, but you try to simulate 40s, then it will crash/stop simulating at 3.6s and complain about the missing information.
I hope this answers your question!

Best regards,
Bruno
Many thanks!
musahossein is offline   Reply With Quote

Old   October 24, 2011, 20:36
Default 6DoF.dat file
  #8
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
I looked at the 6DoF.dat file that is read in the example for the SoloshingTank6DoF solver in interDyMFoam. All the displacements are positive. How is it then when the solver is run, the result is a swaying and rocking motion? in other words oscillation is occurring?
musahossein is offline   Reply With Quote

Old   October 25, 2011, 03:27
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi musahossein,

Following the breadcrumbs:
As you can see in the tutorial's file "constant/dynamicMeshDict": https://github.com/OpenFOAM/OpenFOAM...ynamicMeshDict - it's that type of motion it's using.
In the first link you can also find other types of motion for "solidBodyMotionFvMesh".

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   November 1, 2011, 08:09
Default reading data from ".dat" file
  #10
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi musahossein,

Following the breadcrumbs:
As you can see in the tutorial's file "constant/dynamicMeshDict": https://github.com/OpenFOAM/OpenFOAM...ynamicMeshDict - it's that type of motion it's using.
In the first link you can also find other types of motion for "solidBodyMotionFvMesh".

Best regards,
Bruno
As I try to trace the different modules that do different things, I am not sure I understand where the data acutally read and the displaments computed. I found one header file "septernion.H". Doe this have the necessary references for reading ".dat" data file and deriving the translations?
musahossein is offline   Reply With Quote

Old   November 1, 2011, 08:34
Default
  #11
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi musahossein,
Quote:
Originally Posted by musahossein View Post
As I try to trace the different modules that do different things, I am not sure I understand where the data acutally read and the displaments computed. I found one header file "septernion.H". Doe this have the necessary references for reading ".dat" data file and deriving the translations?
The file is read in the following method: http://foam.sourceforge.net/docs/cpp...ce.html#l00122
The calculations are made in the transformation method: http://foam.sourceforge.net/docs/cpp...ce.html#l00075
Notice the file name where these methods are.

As for the "septernion", this is returned by the transformation method, which is then used to do «perform translations and rotations in 3D space.» (seen here: http://foam.sourceforge.net/docs/cpp/a01773.html) I haven't looked who calls this method exactly, but my guess is that it is the dynamic mesh methods/classes that handle this, in the respective library.

This is why I said if you keep the third dimension related values always at zero, the motions will only be in 2D. Don't forget that OpenFOAM doesn't do finite volume in 2D, it always does it in 3D but can ignore the third dimension if so defined, just as shown in the first tutorial on the User Guide: http://www.openfoam.com/docs/user/cavity.php#x5-40002.1

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   November 17, 2011, 21:09
Default difference between ras and turbulent properties
  #12
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
I am trying to understand how the files and directories are set up in the sloshingTank2D in interDyMFoam. In the constant folder, there is file called RASProperties. In RASProperties, the RASModel is set as laminar, and turbulence is set to off. In the same folder, in the turbulenceProperties file, simulationType is set to laminar. My question is, if the turbulence is set to off in RASModel, is turbulenceProperties called at all during the analysis?

I would greatly appreciate it if someone can answer this. Many thanks to bruno for his many responses.
musahossein is offline   Reply With Quote

Old   November 17, 2011, 21:21
Default fvschemes
  #13
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Here is another question. In sloshingTank2D (under multiphase, interDyMFOAM), there is a file called fvSchemes. In that file various schemes are listed. Are all these schemes used during analysis? if yes, how does the solver know which to apply when? Or are these to be selected by the user? I am not sure I understand the function of this file. Can anyone explain? Thanks
musahossein is offline   Reply With Quote

Old   November 17, 2011, 21:35
Default phase and alpha
  #14
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
The properties for phase1 and phase2 are set up intransportProperties file (constant folder for sloshingTank2D, interDyMFOAM). There are also parameters aplha1 and aplha2, denoting two phases in file setFieldsDict (system folder). Does phase1 and phase2 define the same phase as alpha1 and alpha2 ? If yes, how are the properties for phase1 and 2 transferred to alpha1 and 2 during the program run?

Advance thanks to whoever replies.
musahossein is offline   Reply With Quote

Old   March 3, 2020, 17:39
Default
  #15
New Member
 
sreekanth
Join Date: Dec 2019
Posts: 13
Rep Power: 6
neko2650 is on a distinguished road
[QUOTE=wyldckat;330314]Hi musahossein,

The file is read in the following method: http://foam.sourceforge.net/docs/cpp...ce.html#l00122
The calculations are made in the transformation method: http://foam.sourceforge.net/docs/cpp...ce.html#l00075
Notice the file name where these methods are.

As for the "septernion", this is returned by the transformation method, which is then used to do «perform translations and rotations in 3D space.» (seen here: http://foam.sourceforge.net/docs/cpp/a01773.html) I haven't looked who calls this method exactly, but my guess is that it is the dynamic mesh methods/classes that handle this, in the respective library.

This is why I said if you keep the third dimension related values always at zero, the motions will only be in 2D. Don't forget that OpenFOAM doesn't do finite volume in 2D, it always does it in 3D but can ignore the third dimension if so defined, just as shown in the first tutorial on the User Guide: http://www.openfoam.com/docs/user/cavity.php#x5-40002.1

Hi,

I am working on simlar case but the above URL are not opening the required page. Kindly upload the updated URL.
neko2650 is offline   Reply With Quote

Reply

Tags
tank sloshing 2d


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
1.7.x Environment Variables on Linux 10.04 rasma OpenFOAM Installation 9 July 30, 2010 04:43
[OpenFOAM] ParaView 33 canbt open OpenFoam file hariya03 ParaView 7 September 25, 2008 17:33
[OpenFOAM] Paraview command not found hardy ParaView 7 September 18, 2008 04:59
Compiling OpenFOAM13 on AMD64 with Redhat Enterprise mbeaudoin OpenFOAM Installation 20 June 17, 2008 06:43
Results saving in CFD hawk Main CFD Forum 16 July 21, 2005 20:51


All times are GMT -4. The time now is 08:29.