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

possibility of converting 3D->2D for saving simulation time

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 11, 2013, 20:04
Default possibility of converting 3D->2D for saving simulation time
  #1
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 7
liguifan is on a distinguished road
Hello Foamers,

I am just wondering if I can reduce a 3D symmetrical simulation to a 2D simulation (maybe it is a dull question)?

What I am doing is to find the oil spreading time on cylindrical water tank. Since I need to make refined mesh of the interface of oil and water, but I can not afford the huge computational time for a 3D modeling.

I am not sure whether the simulation result is same or not.

Please give me some suggestion if possible.
liguifan is offline   Reply With Quote

Old   April 14, 2013, 19:31
Default
  #2
New Member
 
Eric
Join Date: Mar 2013
Posts: 22
Rep Power: 5
erichu is on a distinguished road
Quote:
Originally Posted by liguifan View Post
Hello Foamers,

I am just wondering if I can reduce a 3D symmetrical simulation to a 2D simulation (maybe it is a dull question)?

What I am doing is to find the oil spreading time on cylindrical water tank. Since I need to make refined mesh of the interface of oil and water, but I can not afford the huge computational time for a 3D modeling.

I am not sure whether the simulation result is same or not.

Please give me some suggestion if possible.

Hello,
you can try using a 2D axisymmetric wedge. However, I cannot comment the accuracy.
Would it be possible for you to coarsen the 3D mesh?
erichu is offline   Reply With Quote

Old   April 14, 2013, 19:45
Default
  #3
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 7
liguifan is on a distinguished road
Thanks for the reply, do you have any idea about how to set up the boundary condition?
Here is my U file for 3D case
Quote:
boundaryField
{
outerWall
{
type fixedValue;
value uniform (0 0 0);
}

lowerWall
{
type fixedValue;
value uniform (0 0 0);
}
atmosphere
{
type fluxCorrectedVelocity;
value uniform (0 0 0);
}
}
I would assume for the 2D case, it would be something like:
Quote:
boundaryField
{
outerWall
{
type fixedValue;
value uniform (0 0 0);
}
wedge1
{
type wedge;

}
wedge2
{
type wedge;
}
atmosphere
{
type fluxCorrectedVelocity;
value uniform (0 0 0);
}

}
Please correct me if I am wrong.

Thanks very much for that.
liguifan is offline   Reply With Quote

Old   April 15, 2013, 00:46
Default
  #4
Member
 
Akshay Kumar
Join Date: Aug 2010
Location: India
Posts: 82
Rep Power: 8
Akshay is on a distinguished road
Hi Guifan
The 2d axis-symmetric wedge bc should work fine as Eric mentioned. What you have written down is the way to go. Put up a few pictures of your case and let's see how it's supposed to be done.
A small wedge angle needs to be there from the start. You cannot bring in an actual 2D model.

Cheers!
Akshay
Akshay is offline   Reply With Quote

Old   April 15, 2013, 10:56
Default
  #5
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 7
liguifan is on a distinguished road
Hi Akshay,

Firstly, thanks very much for you comment.
Here is the case I use a 2D to simulate the 3D( equivalent to: I cut a piece from the 3D water tank centre)
http://www.cfd-online.com/Forums/ope...tml#post420524

According to your suggestion, I also tried the 2D-axisymmetrical wedge and here is the details.
I following the following steps
1) build a rectangular mesh and convert it to a wedge using makeAxialMesh -axis axi -wedge frontAndBackPlanes ultility
then I get the following file in the newly created folder, and I replace the original Ploymesh folder under contant/
Quote:
7
(
axi
{
type symmetryPlane;
nFaces 39;
startFace 2271;
}
frontAndBackPlanes
{
type patch;
nFaces 0;
startFace 2310;
}
lowerWall
{
type patch;
nFaces 30;
startFace 2310;
}
outerWall
{
type patch;
nFaces 39;
startFace 2340;
}
atmosphere
{
type patch;
nFaces 30;
startFace 2379;
}
frontAndBackPlanes_pos
{
type wedge;
nFaces 1170;
startFace 2409;
}
frontAndBackPlanes_neg
{
type wedge;
nFaces 1170;
startFace 3579;
}
)
3) then I use collapeEdges 1e-8 180 ultility, it create another folder 0.001
I get
Quote:
7
(
axi
{
type symmetryPlane;
nFaces 0;
startFace 2271;
}
frontAndBackPlanes
{
type patch;
nFaces 0;
startFace 2271;
}
lowerWall
{
type patch;
nFaces 30;
startFace 2271;
}
outerWall
{
type patch;
nFaces 39;
startFace 2301;
}
atmosphere
{
type patch;
nFaces 30;
startFace 2340;
}
frontAndBackPlanes_pos
{
type wedge;
nFaces 1170;
startFace 2370;
}
frontAndBackPlanes_neg
{
type wedge;
nFaces 1170;
startFace 3540;
}
)
4) I replace this new folder with the polymesh in the constant/ again.
Since the "axi" and "frontAndBackPlanes" are with nFaces 0, so I deleted them in the boundary file and updated the alpha.org, U and p_rgh file accordingly.

5) I run checkMesh, I got the errors
Quote:
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 2440
internal points: 0
faces: 4710
internal faces: 2271
cells: 1170
boundary patches: 6
point zones: 0
face zones: 0
cell zones: 1

Overall number of cells of each type:
hexahedra: 1131
prisms: 39
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
axi 0 0 ok (empty)
lowerWall 30 61 ok (non-closed singly connected)
outerWall 39 80 ok (non-closed singly connected)
atmosphere 30 61 ok (non-closed singly connected)
frontAndBackPlanes_pos1170 1240 ok (non-closed singly connected)
frontAndBackPlanes_neg1170 1240 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (-0.001 0 -0.000117163) (0.02 0.06 0.00511716)
Mesh (non-empty, non-wedge) directions (1 1 0)
Mesh (non-empty) directions (1 1 1)
Wedge frontAndBackPlanes_pos with angle 2.49766 degrees
***Wedge patch frontAndBackPlanes_pos not planar. Point (0.00222222 0.058 0.00502992) is not in patch plane by 3.9962e-08 meter.
Boundary openness (2.73117e-18 1.01068e-20 7.05232e-18) OK.
Max cell openness = 1.97881e-16 OK.
Max aspect ratio = 59.0006 OK.
Minumum face area = 5.81594e-09. Maximum face area = 1.16322e-05. Face area magnitudes OK.
Min volume = 5.81594e-12. Max volume = 2.28767e-08. Total volume = 3.29763e-06. Cell volumes OK.
Mesh non-orthogonality Max: 5.67294e-05 average: 1.46889e-05
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 0.330801 OK.
Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End
I am not sure why is this.



When I run multiphaseInterFoam I got the erros
Quote:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.1-221db2718bbb
Exec : multiphaseInterFoam
Date : Apr 15 2013
Time : 10:25:11
Host : "liguifan-laptop"
PID : 4827
Case : /home/liguifan/Desktop/damBreak2
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

Reading field p_rgh

Reading field U

Reading/calculating face flux field phi



--> FOAM FATAL IO ERROR:
Attempt to return dictionary entry as a primitive

file: /home/liguifan/Desktop/damBreak2/constant/transportProperties:hases from line 20 to line 36.

From function ITstream& primitiveEntry::stream() const
in file db/dictionary/dictionaryEntry/dictionaryEntry.C at line 82.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::IOerror::abort() in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Foam::dictionaryEntry::stream() const in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#3 Foam::dictionary::lookup(Foam::word const&, bool, bool) const in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#4 Foam::multiphaseMixture::multiphaseMixture(Foam::G eometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libmultiphaseInterFoam.so"
#5
in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/multiphaseInterFoam"
#6 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#7
in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/multiphaseInterFoam"
Aborted
Here is my alpha.org , U and p_rgh file
Quote:
boundaryField
{
outerWall
{
type buoyantPressure;
value uniform 0;
}


lowerWall
{
type buoyantPressure;
value uniform 0;
}


atmosphere
{
type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho rho;
psi none;
gamma 1;
value uniform 0;
}

axi
{
type symmetryPlane;
}
frontAndBackPlanes_pos
{
type wedge;

}
frontAndBackPlanes_neg
{
type wedge;

}
}
U
Quote:
boundaryField
{


lowerWall
{
type fixedValue;
value uniform (0 0 0);
}

outerWall
{
type fixedValue;
value uniform (0 0 0);
}
atmosphere
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
axi
{type symmetryPlane;
//value uniform (0 0 0);
}
frontAndBackPlanes_pos
{
type wedge;

}
frontAndBackPlanes_neg
{
type wedge;

}
}
alpha1.org
Quote:
boundaryField
{

outerWall
{
type zeroGradient;
}

lowerWall
{
type zeroGradient;
}

atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}

axi
{
type symmetryPlane;
}
frontAndBackPlanes_pos
{
type wedge;

}
frontAndBackPlanes_neg
{
type wedge;

}
}
Hope you can give me some suggestion!
Attached Images
File Type: jpg Screen Shot 2013-04-15 at 10.53.18 AM.jpg (39.0 KB, 8 views)
liguifan is offline   Reply With Quote

Old   April 15, 2013, 11:46
Default
  #6
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,713
Rep Power: 27
ngj will become famous soon enoughngj will become famous soon enough
Hi Guifan,

The reported problem in your simulation is with your constant/transportProperties file. Please post this as well.

Where I see this?

Quote:
--> FOAM FATAL IO ERROR:
Attempt to return dictionary entry as a primitive

file: /home/liguifan/Desktop/damBreak2/constant/transportProperties:hases from line 20 to line 36.
Kind regards

Niels
ngj is offline   Reply With Quote

Old   April 15, 2013, 12:01
Default
  #7
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 7
liguifan is on a distinguished road
Thanks for the reply!

Sorry for that I forgot to put it.
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

phase1
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
rho rho [ 1 -3 0 0 0 0 0 ] 1000;
CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
m m [ 0 0 1 0 0 0 0 ] 1;
n n [ 0 0 0 0 0 0 0 ] 0;
}

BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 99.6;
n n [ 0 0 0 0 0 0 0 ] 0.1003;
}
}

phase2
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
rho rho [ 1 -3 0 0 0 0 0 ] 1;
CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
m m [ 0 0 1 0 0 0 0 ] 1;
n n [ 0 0 0 0 0 0 0 ] 0;
}

BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 99.6;
n n [ 0 0 0 0 0 0 0 ] 0.1003;
}
}

sigma sigma [ 1 0 -2 0 0 0 0 ] 0.07;
Quote:
Originally Posted by ngj View Post
Hi Guifan,

The reported problem in your simulation is with your constant/transportProperties file. Please post this as well.

Where I see this?

Kind regards

Niels
liguifan is offline   Reply With Quote

Old   April 15, 2013, 12:06
Default
  #8
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,713
Rep Power: 27
ngj will become famous soon enoughngj will become famous soon enough
The problem is that you are using a transportProperties file for interFoam, however, you have executed multiphaseInterFoam.

Take a look in its tutorial to see how you should define the fluid properties.

Kind regards

Niels
ngj is offline   Reply With Quote

Old   April 15, 2013, 12:15
Default
  #9
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 7
liguifan is on a distinguished road
Hi Niels,

Thanks for pointing out this for me and I will give it another try to see what happen later this afternoon.

Beside this problem, do you think my boundary for "axi" which is the axis correct.

Since in tutorial of NozzelFlow2D, its BC for axis is empty. However in my case after I execuated makeAxialMesh command. The BC for me axis is

Quote:
axi{
type symmetryPlane;
}
Does the difference hurt the result?

Kind regard,
Guifan
liguifan is offline   Reply With Quote

Old   April 15, 2013, 12:17
Default
  #10
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,713
Rep Power: 27
ngj will become famous soon enoughngj will become famous soon enough
Hi Guifan,

I can unfortunately help you, since I do not have any experience with wedge-type meshes.

Kind regards

Niels
ngj is offline   Reply With Quote

Old   April 15, 2013, 12:18
Default
  #11
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 7
liguifan is on a distinguished road
Thanks anyway for the help! I will try to test more case to see the difference.

Cheers!

Kind regards,
Guifan
liguifan is offline   Reply With Quote

Old   April 16, 2013, 00:43
Default
  #12
Member
 
Akshay Kumar
Join Date: Aug 2010
Location: India
Posts: 82
Rep Power: 8
Akshay is on a distinguished road
Hi Guifan!
The 'axi' boundary has 0 faces anyway, so it shouldn't really matter what BC you're declaring it as. As Niels rightly pointed out..
"--> FOAM FATAL IO ERROR:
Attempt to return dictionary entry as a primitive"
The way you have declared the phases are wrong. The materials should fall inside a phases block.
Let me know if this gets you through. Post your fvSolution file as well.
Cheers!
Akshay is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sudden jump in Courant number NJG OpenFOAM Running, Solving & CFD 7 May 15, 2014 13:52
Simulation time vs. Simulation Cell Count chrisoturner Main CFD Forum 7 September 8, 2012 17:46
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 07:56
Total time for simulation Meerkat Main CFD Forum 1 September 5, 2011 07:17
Time step in transient simulation shib FLUENT 0 June 17, 2010 13:07


All times are GMT -4. The time now is 06:58.