|
[Sponsors] |
Current state of Open Source vs Commercial CFD solvers |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 2, 2015, 03:51 |
|
#21 | |
Senior Member
Join Date: May 2012
Posts: 551
Rep Power: 16 |
Quote:
Increased velocity to traverse domain in 5 seconds (u=0.1 m/s and L=0.5 m) |
||
October 2, 2015, 03:54 |
|
#22 | |||||||
Senior Member
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20 |
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Do not try to compute the flow around an F-15 at Mach 3 with chemical reaction with a global spectral scheme, and do no do turbulence in a box with a commercial solver. Live and let live! |
||||||||
October 2, 2015, 04:31 |
|
#23 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73 |
||
October 2, 2015, 04:39 |
|
#24 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73 |
Quote:
I am not sure about this issue... Assuming you have the previous case of the closed channel with one inflow, a solution for the continuous problem does not exist because the compatibility relation is not satisfied. Therefore, I wonder what in the discrete approximated model changed in such a way to allow for the existence of a solution. That is not a sanity check, it simply should not work. I assume that the key is that the discrete pointwise div V = 0 constraint is relaxed, simulating a slow compressible solution. If you set this constraint at machine precisione, Fluent must not give a discrete solution. |
||
October 2, 2015, 04:53 |
|
#25 |
Member
Joćo Ferreira
Join Date: Nov 2014
Location: Braga, Portugal
Posts: 53
Rep Power: 12 |
I have been working with openFoam for a year now and I can see a lot of potential inside it.
Truth is that getting comfortable with openFoam takes a lot of time, things like working with no GUI and very poor documentation makes it even hard. Although I would say that this is the price to pay to have such complete open source library with no licence needed. Regarding commercial CFD solvers I see them as having what the industry needs. Despite of how it is done and what kind of things the code does to make the solution converge, it gives fast results with relatively ease of setting up everything form pre to post-processing. I am not very experienced with commercial CFD so this is just my opinion. Do you think openFoam is, at the moment, ready to heavy industrial use? |
|
October 2, 2015, 05:37 |
|
#26 |
Senior Member
Join Date: May 2012
Posts: 551
Rep Power: 16 |
||
October 2, 2015, 06:40 |
|
#27 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73 |
||
October 2, 2015, 07:21 |
|
#28 |
Senior Member
Join Date: May 2012
Posts: 551
Rep Power: 16 |
The mass imbalance can be seen in the figure.
|
|
October 2, 2015, 07:31 |
|
#29 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73 |
||
October 2, 2015, 07:43 |
|
#30 |
Senior Member
Join Date: May 2012
Posts: 551
Rep Power: 16 |
Nice to see that this confuses more than just myself. Bogus setup yields bogus result, but in this case it should really not yield any result. I will see if I can plot the div v field.
|
|
October 2, 2015, 10:51 |
|
#31 |
Senior Member
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25 |
Turn off "Node Values." You want to see the actual cell value of the mass imbalance, not the values interpolated to the nodes and then linearly interpolated to the plot.
I reiterate. The mass imbalance shown in the onscreen report is SOLELY a function of the defined boundary conditions, in this case. All of BCs are fixed flux--the value of the mass fluxs through all of the faces are set to those values: Code:
MASSFLUX[wallFaces] = 0.0. MASSFLUX[velocityInletFaces] = prescribedNormalVelocity*prescribedDensity Code:
forFace(f,wallFaces): sum += MASSFLUX[f]*AREA[f] Again, I am not here to speak for ANSYS. . If you want to know what the codes are doing, read the manual. Fluent's documentation on its discretization schemes is quite thorough and consistent with what I saw in the code. |
|
October 2, 2015, 11:22 |
|
#32 | |
Senior Member
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25 |
Quote:
As this problem is posed, the pressure equation has no solution. That is obvious...just assume the entire domain meshed with one cell. Nothing but BCs on the cell faces. Div v != 0. You can subdivide that cell and build a pressure field inside, but its solution is meaningless with regard to the continuous problem. You can't find a pressure field that will make div v = 0 everywhere. But you CAN find a pressure field that minimizes the error norm of the mass imbalance and that is what Fluent is doing. Maybe if LU factorization with pivoting were applied to that pressure equation, it would find a zero pivot and error out. But any real CFD is going to use iterative linear solvers, and those are all designed to relax solutions to reduce some error norm. It is doing exactly what it is supposed to. I will say that all real CFD codes that do anything much harder than simple pressure/density/velocity solutions will have tweaks in them to keep the solution sane, especially during the early stages of iteration. "Turbulent viscosity limited to 1e5 of laminar viscosity" is a common Fluent limit that is hit. I wrote some electrochemistry code many years ago, and when it started, the concentration of reactants was high with no products (from initialization) and I would see MEGA-AMP currents in my fuel cell models. That needed to be tamped down to keep the solution sane. The list of these is long, especial if you start doing anything with multiphase, reacting flows, or radiation. But those guide rails exist solely to keep the solution on track and will not be active as the solution reaches convergence. (keep density positive, keep mass fractions between 0 and 1, etc) They make CFD codes more robust and let you get an answer instead of NaNs or division by zero errors. |
||
October 2, 2015, 11:36 |
|
#33 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73 |
Quote:
sorry, I still do not understand your point.... let me follow your example, the single cell covering all the domain. the constraint div v= 0 implies that int [S] vn ds = 0. That is not verified (vn at inflow is not zeor) and Fluent cannot minimize nothing in the interior... On the other hand, in a FV discretization, the telescopic property of the numerical fluxes, reduces still the mass conservation consistence at the boundaries... Again, in the incompressiblem model, the Poisson equation has a solution provided that the compatibility relation is fulfilled. This property must be ensured not only in the continuous form but is fundamental also in the discrete form. Conversely, the fractional step method (projection) still works... I am sure that something in the Fluent computation is not known to me... |
||
October 2, 2015, 11:59 |
|
#34 | |
Senior Member
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25 |
Quote:
The confusion here may arise because, unlike fractional step, the pressure equation here is not being solved to high precision for each iteration/timestep. Normally, in SIMPLE, you only iterate each linear equation solver enough to reduce the error norm by a factor of 0.1-0.001. It is inefficient to "over-solve" linear systems as the nonlinear error is what we are trying to drive down--the linear solvers just give us successive corrections to that nonlinear error. If the error tolerance for the linear solver of the pressure equation were reduced, you will likely find that the linear solver can't converge because it cannot get the L2 norm any lower due to the presence of the mass defect. Your criticisms are valid, but they are likely criticisms of SIMPLE-type solvers and common CFD practice moreso than Fluent in particular. And, again, we are looking at a failure mode that exists because of user error--a car doesn't run very well if you try to drive it on a lake. 8) |
||
October 2, 2015, 12:23 |
|
#35 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73 |
Quote:
ok, so the question is: why setting the fractional step method produces the same kind of solution instead of crashing?? In this case there is no other possibility that driven the pressure equation at convergence at each time step. That should not work starting from the first time step... |
||
October 2, 2015, 12:26 |
|
#36 | |
Senior Member
Join Date: May 2012
Posts: 551
Rep Power: 16 |
Quote:
Last edited by Simbelmynė; October 2, 2015 at 12:30. Reason: added figure |
||
October 2, 2015, 12:50 |
|
#37 | |
Senior Member
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25 |
Quote:
If we view fractional step "pressure-like" variable phi as a projection mechanism that removes the div v component. Code:
vCorrected = v - grad(phi) Code:
div(vCorrected) = 0 The question is then what is the error tolerance with the fractional step method? How is that error tolerance normalized? Is it kg/s or kg/s/m^3. Some code normalize linear error versus the residual. Fractional step in this case could be building a velocity field that has huge mass imbalance and the solver normalizes to that big residual and reduces it down to some level and stops. If you look at real mass imbalance as the metric of phi convergence (kg/s/m^3) and look at it relative to the mass defect (kg/s) for the system divided by the solution volume, you should see that there is a floor to that residual at that scale. Sorting this out requires getting deep into the weeds about normalization of both linear and nonlinear error and again, it is putting linear equation solvers in the position of finding a minimum error solution to singular problem. |
||
October 2, 2015, 13:00 |
|
#38 | |
Senior Member
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25 |
Quote:
If you remain concerned that Fluent is "cooking the books" with mass conservation here, I'd direct those concerns to your support engineer and they can have a developer take a look. My suspicion is that it will go something like: Q: "It gives me garbage answers when I give it an ill-posed problem." A: "So, don't give it ill-posed problems." Developers are jerks that way. 8) |
||
October 2, 2015, 13:18 |
|
#39 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73 |
Quote:
yes, I was talking about the NITA solver.... it is quite simple to see that it is based on the solution of the Hodge decomposition v* = v + Grad phi with prescribed normal component on the boundary vn* = vn + d phi/dn Therefore the pressure equation is Div Grad Phi = Div v* with d phi/dn = vn* - vn on the boundaries. You can easily see that convergence of a linear system solver for this pressure problem is obtained provided that int [S] vn dS = 0. Therefore, I expect Fluent giving a message to the user .... If that is not the case, I don't know what NITA would really solve.... |
||
October 2, 2015, 13:27 |
|
#40 | |
Senior Member
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem compiling a custom Lagrangian library | brbbhatti | OpenFOAM Programming & Development | 2 | July 7, 2014 12:32 |
OpenFOAM without MPI | kokizzu | OpenFOAM Installation | 4 | May 26, 2014 10:17 |
friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 11:57 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |
Where do we go from here? CFD in 2001 | John C. Chien | Main CFD Forum | 36 | January 24, 2001 22:10 |