|
[Sponsors] | |||||
Creating a solver for the nondimensionalized Navier-Stokes equation |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
|
#21 |
|
New Member
Mehrez
Join Date: Nov 2012
Location: Bordeaux, France
Posts: 19
Rep Power: 2 ![]() |
dimensions [0 0 0 0 0 0 0];
This line represent the dimension of U and p. I have this line in the 2 files cavity/0/p and cavity/0/U |
|
|
|
|
|
|
|
|
#22 |
|
New Member
Mehrez
Join Date: Nov 2012
Location: Bordeaux, France
Posts: 19
Rep Power: 2 ![]() |
Dear Tobi,
Here is what I got by setting pGrad pGrad [0 -1 0 0 0 0 0] Create time Create mesh for time = 0 Reading transportProperties Reading field p Reading field U Reading/calculating face flux field phi Starting time loop Time = 0.005 Courant Number mean: 0 max: 0 --> FOAM FATAL ERROR: incompatible dimensions for operation [U[0 -1 0 0 0 0 0] ] - [U[0 -2 0 0 0 0 0] ] From function checkMethod(const fvMatrix<Type>&, const fvMatrix<Type>&) in file /opt/openfoam211/src/finiteVolume/lnInclude/fvMatrix.C at line 1316. FOAM aborting #0 Foam::error: rintStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"#1 Foam::error::abort() in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #2 in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/myIcoFoamB" #3 in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/myIcoFoamB" #4 in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/myIcoFoamB" #5 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6" #6 in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/myIcoFoamB" Aborted (core dumped) ubuntu@ubuntu-VirtualBox:~/OpenFOAM/mehrez-2.1.1/test/cavity$ |
|
|
|
|
|
|
|
|
#23 |
|
New Member
Mehrez
Join Date: Nov 2012
Location: Bordeaux, France
Posts: 19
Rep Power: 2 ![]() |
Even if I do this, it doesn't work :
0/p dimensions [0 -1 0 0 0 0 0]; 0/U dimensions [0 0 0 0 0 0 0]; transportProperties Re Re [ 0 -1 0 0 0 0 0 ] 0.01; gradP gradP [ 0 -2 0 0 0 0 0 ] (0.9 0.2 0); This is what I got : Create time Create mesh for time = 0 Reading transportProperties Reading field p Reading field U Reading/calculating face flux field phi Starting time loop Time = 0.005 Courant Number mean: 0 max: 0 DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 6.17543e-06, No Iterations 17 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 3.68856e-06, No Iterations 14 --> FOAM FATAL ERROR: LHS and RHS of + have different dimensions dimensions : [0 2 0 0 0 0 0] + [0 4 -1 0 0 0 0] From function operator+(const dimensionSet&, const dimensionSet&) in file dimensionSet/dimensionSet.C at line 514. FOAM aborting #0 Foam::error: rintStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"#1 Foam::error::abort() in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #2 Foam: perator+(Foam::dimensionSet const&, Foam::dimensionSet const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"#3 at myIcoFoamB.C:0 #4 in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/myIcoFoamB" #5 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6" #6 in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/myIcoFoamB" Aborted (core dumped) ubuntu@ubuntu-VirtualBox:~/OpenFOAM/mehrez-2.1.1/test/cavity$ |
|
|
|
|
|
|
|
|
#24 |
|
New Member
Mehrez
Join Date: Nov 2012
Location: Bordeaux, France
Posts: 19
Rep Power: 2 ![]() |
Any idea ? does someone know how to ignore the dimension-checking in the "controlDict" file ?
I'm stuck... |
|
|
|
|
|
|
|
|
#25 |
|
Senior Member
|
Oh its not my day today, sorry.
Now I understand what you are doing. Hmmm I have to try it by my self but i have no time. It should be possible. |
|
|
|
|
|
|
|
|
#26 | |
|
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 513
Rep Power: 9 ![]() |
Quote:
cd $FOAM_INST_DIR/OpenFOAM-2.1.0/etc You can go to the line with dimensionSet (line 400 for me), and change the switch to 0. I assume this does not check the dimensions, but I am not sure about it. If you don't have privileges to change that controlDict, you can set it in a .OpenFOAM/2.1.0/ folder in your home-directory. Good luck, I hope this works. |
||
|
|
|
||
|
|
|
#27 |
|
New Member
Mehrez
Join Date: Nov 2012
Location: Bordeaux, France
Posts: 19
Rep Power: 2 ![]() |
Dear both,
It seems that it is working ! Thank you for your precious help. I hope that this discussion will help other beginners. Thank you. Best regards. Mehrez. |
|
|
|
|
|
|
|
|
#28 |
|
Senior Member
Hisham El Safti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 236
Blog Entries: 9
Rep Power: 6 ![]() |
Dear Mehrez
It is nice that your solver is working now. However, I think you better track the dimensions of your equation ... It is a very nice feature to override. Especially, if you have problems with verification of your solver. Regards, Hisham |
|
|
|
|
|
|
|
|
#29 |
|
New Member
Mehrez
Join Date: Nov 2012
Location: Bordeaux, France
Posts: 19
Rep Power: 2 ![]() |
Dear Hisham,
If you look just a little above you will see that I tried to multiply the terms of my equation with coefficients of different dimensions to get a dimensionless form of my equation but it did not work and I do not know why ... Otherwise I have another question, how to have the steady state? (is not more convenient if I modify another solver like SimpleFoam because removing the line ddt (U) on IcoFoam gives a false result) thank you Mehrez |
|
|
|
|
|
|
|
|
#30 |
|
Senior Member
Hisham El Safti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 236
Blog Entries: 9
Rep Power: 6 ![]() |
You can edit the system/fvSchemes from:
Code:
ddtSchemes
{
default Euler;
}
Code:
ddtSchemes
{
default steadyState;
}
Regards, Hisham |
|
|
|
|
|
|
|
|
#32 |
|
New Member
Mehrez
Join Date: Nov 2012
Location: Bordeaux, France
Posts: 19
Rep Power: 2 ![]() |
Hi Hisham,
I've found the following text on the OpenFoam tutorial : " When specifying a time scheme it must be noted that an application designed for transient problems will not necessarily run as steady-state and visa versa. For example the solution will not converge if steadyState is specified when running icoFoam, the transient, laminar incompressible flow code; rather, simpleFoam should be used for steady-state, incompressible flow. " So, to implement a solver that resolves the following equation (steady-state) : fvVectorMatrix UEqn ( // fvm::ddt(U) Re*(fvm::div(phi, U)) - fvm::laplacian(U) + gradP ); solve(UEqn == -fvc::grad(p)); I need to modify the simpleFoam solver rather than icoFoam. Looking at the simpleFoam solver, I've found 2 files pEqn.H and UEqn.H but I don't know how to modify the equations... can you please tell me what I need to delete (like the turbulence terms). Thank you. Best regards. Mehrez |
|
|
|
|
|
|
|
|
#33 |
|
Senior Member
Hisham El Safti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 236
Blog Entries: 9
Rep Power: 6 ![]() |
OpenFOAM solvers use three major algorithms:
- SIMPLE: for steady state (e.g. simpleFoam) - PISO: for transient problems (e.g. icoFoam and pisoFoam) - PIMPLE: for steady state and transient because it is a merge of SIMPLE and PISO (e.g. pimpleFoam) So as I mentioned earlier you need to base your solver on pimpleFoam. When you compare simpleFoam you need to compare it with pisoFoam because both has turbulence modelling while icoFoam has no turbulence modelling capabilities enabled. Regards, Hisham |
|
|
|
|
|
|
|
|
#34 |
|
New Member
Mehrez
Join Date: Nov 2012
Location: Bordeaux, France
Posts: 19
Rep Power: 2 ![]() |
Dear Hisham,
Thank you for your help. In pimpleFoam there are 2 files to implement my equation : UEqn.H and pEqn.H , so it is different from icoFoam where I had one file to implement the equation. Can I do some change on the icoFoam solver to be able to solve with pimple algorithm rather than piso ? If not, in which file do I have to put my equation in the pimpleFoam solver ? Thank you so much for your help and excuse me for these questions. best regards. Mehrez |
|
|
|
|
|
|
|
|
#35 |
|
Senior Member
|
Hi,
did you see http://openfoam-extend.sourceforge.n...m/training.htm take a look at the tutorials "New Developer" http://switch.dl.sourceforge.net/pro...he_slides2.pdf =>start @Slide10 to 19 Copy and rename scalarTransportFoam |
|
|
|
|
|
|
|
|
#36 |
|
New Member
Mehrez
Join Date: Nov 2012
Location: Bordeaux, France
Posts: 19
Rep Power: 2 ![]() |
Thank you elvis
|
|
|
|
|
|
|
|
|
#37 |
|
New Member
OFghost
Join Date: Feb 2013
Location: Canada
Posts: 2
Rep Power: 0 ![]() |
Hi,
I am having the similar problem, please help me to deal with. Thanks |
|
|
|
|
|
![]() |
| Tags |
| navier-stokes solver, openfoam |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| suGWFoam: Richards equation solver for porous media flows | liu | OpenFOAM Announcements from Other Sources | 0 | November 11, 2012 20:09 |
| Navier Stokes solver | Siddharth | Main CFD Forum | 2 | September 13, 2007 01:06 |
| test prob for 2D unsteady navier stokes equation | Shah | Main CFD Forum | 5 | April 20, 2007 07:25 |
| Navier Stokes Solver | Khan | Main CFD Forum | 2 | December 12, 2006 09:41 |
| help: I am trying to solve Navier Stokes compressible and viscid flow | Jose Choy | Main CFD Forum | 2 | May 18, 2000 05:45 |