|
[Sponsors] |
July 4, 2007, 09:46 |
Hi
I would like to change t
|
#1 |
New Member
dimitri bonnet
Join Date: Mar 2009
Posts: 9
Rep Power: 17 |
Hi
I would like to change the laplacian term in the momentum predictor in sonicFoam.C to get something like : div( 2*mu (0.5(grad(U)+t.grad(U)) - 1/3*div(U) I) ) Do I have to keep the form of the left-hand side operators : operator(xxx, U) ? like div(phi,U) or can I do something like : fvc::div(2.0*mu*(symm(fvc::grad(U))-1.0/3.0*fvc::div(U)*I)) ? When I do that way, I can compile but I can't execute, I obtain this error : Caught FoamXIOError exception in FoamXCaseServer::main(int argc, char **argv) : FoamXIOError "Non-optional dictionary entry 'div(2.0*mu*(symm(fvc::grad(U))-1.0/3.0*fvc::div(U)*I))' not found in dictionary\ /home/dbonnet/OpenFOAM/OpenFOAM-1.4/applications/solvers/compressible/nsonicFoam /FoamX/defaults/system/fvSchemes::divSchemes" File "/home/dbonnet/OpenFOAM/OpenFOAM-1.4/applications/solvers/compressible/nsonicFoa m/FoamX/defaults/system/fvSchemes::divSchemes" starting at line 39 ending at line 44 Thank you Dimitri |
|
July 4, 2007, 10:08 |
What you're experiencing is a
|
#2 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
What you're experiencing is a FoamX-error (it can't find the correct discretization scheme for your expression).
At first. If your solver differs from the original solver, call it differently (for instance: dimitrisSonicFoam). It saves you a lot of confusion later. As soon as you have done that it won't work with FoamX anymore. Two solutions: 1. Write cfg-files to support your solver in FoamX 2. Use the solver from the command-line (without FoamX) Solution 2 is easier (really!). The solver WILL complain about missing entries on fvSchemes of your case, but these can be easily added by hand. Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
July 4, 2007, 10:26 |
Hi Bernhard and thank you for
|
#3 |
New Member
dimitri bonnet
Join Date: Mar 2009
Posts: 9
Rep Power: 17 |
Hi Bernhard and thank you for your answer
I had changed the name of the solver "nsonicFoam" instead of "sonicFoam". I have tried to change the cfg-files, but it doesn't work, I would like to know if it is because of the attributes of the operator which are not the same than operators used for the rest of the programm. So do you know how to change the the cfg-files to run the case with FoamX ? Furthermore, when I use the command-line, I get the error : --> FOAM FATAL IO ERROR : keyword div(2.0*mu*(symm(fvc::grad(U))-1.0/3.0*fvc::div(U)*I)) is undefined in dictionary "/home/dbonnet/OpenFOAM/dbonnet-1.4/run/tutorials/nsonicFoam/testmarche/system/f vSchemes::divSchemes" Thank you Dimitri |
|
July 4, 2007, 10:50 |
Hi Dimitri!
No. I once fidd
|
#4 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi Dimitri!
No. I once fiddled around with these cfg-files and decided not to do it again if it can be avoided (which doesn't mean that the concept is bad, it's just that I don't use FoamX and it's therefor not worth the effort for me) Your error: I predicted that in the previous posting. Edit the fvSchemes-file to have an entry in the divSchemes-subdictionary. The format is quite easy to understand (but it is also documented in Chapter 4 of the User Guide) Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
July 4, 2007, 11:32 |
<> should be something like li
|
#5 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
<> should be something like linear/upwind. <> is just a placeholder (for FoamX I think). There is a whole section in chapter 4 dedicated to the discussion of what is valid for fvSchemes (an absolute must-read if you're working outside of FoamX)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
July 4, 2007, 11:43 |
Ok thank you I will work again
|
#6 |
New Member
dimitri bonnet
Join Date: Mar 2009
Posts: 9
Rep Power: 17 |
Ok thank you I will work again on that.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
RANS equation - don't understand a term | Micael Boulet | FLUENT | 3 | July 31, 2008 19:32 |
How to add a source term in u or v equation? | luckyluke | Phoenics | 3 | December 13, 2004 03:52 |
Add source term in species equation | zhou1 | FLUENT | 1 | October 21, 2003 07:28 |
UDF sourse term for VOF equation | ROOZBEH | FLUENT | 5 | April 22, 2003 07:56 |
buoyant term in vorticity equation | junomian | Main CFD Forum | 1 | September 17, 2002 06:28 |