|
[Sponsors] |
January 21, 2008, 01:34 |
you have not recognized progra
|
#1 |
Member
Mojtaba Shahmohammadian
Join Date: Mar 2009
Posts: 73
Rep Power: 17 |
you have not recognized programming in C++ using FOAM classes
|
|
January 21, 2008, 06:28 |
Hi, Mojtaba
Thanks for your
|
#2 |
Member
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 17 |
Hi, Mojtaba
Thanks for your advice. I find myself really lost when hanling FOAM classes, which is my biggest problems in understanding and modifying a solver. My C++ knowledge is in a relative low level and I want to start from the bottom, Could you give some ideas how to do it? All the best Feng |
|
January 21, 2008, 07:26 |
Dear Feng,
I have written a
|
#3 |
Senior Member
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 17 |
Dear Feng,
I have written an intro to programming in OpenFOAM - send me your email address and I'll email it to you (my email address is g.r.tabor@ex.ac.uk) Gavin |
|
January 21, 2008, 13:40 |
Hi Feng!
In the exchange li
|
#4 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi Feng!
In the exchange line write rhoFluid.value()*fluidP instead of rhoFluid*fluidP Have a look at the dimensioned-template to understand why 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 |
|
January 21, 2008, 20:19 |
Dear Gavin
My email addres
|
#5 |
Member
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 17 |
||
January 21, 2008, 20:35 |
Hi, Bernhard,
Now I can com
|
#6 |
Member
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 17 |
Hi, Bernhard,
Now I can compile the solver , but the caculation blows off as soon as it is strted, Below is the end of the caulation Time = 1 Moving mesh Correct mesh motion diffusion field. ICCG: Solving for motionUx: solution singularity ICCG: Solving for motionUy: solution singularity ICCG: Solving for motionUz: solution singularity Biggest movement: 4.73178e+173 Bigges divergence 1.09837e+158 Solving flow in mesh1 Mean and max Courant Numbers = nan nan BICCG: Solving for Ux: solution singularity BICCG: Solving for Uy: solution singularity ICCG: Solving for p: solution singularity ICCG: Solving for p: solution singularity ICCG: Solving for p: solution singularity time step continuity errors : sum local = nan, global = nan, cumulative = nan ICCG: Solving for p: solution singularity ICCG: Solving for p: solution singularity ICCG: Solving for p: solution singularity time step continuity errors : sum local = nan, global = nan, cumulative = nan Solving structure in mesh2 ICCG: Solving for Udispx: solution singularity ICCG: Solving for Udispy: solution singularity Max sigmaEq = inf Max sigmazz = 0 Maximum Displacement: 4.73178e+173 The maximum displacement is terribly wrong. By the way, I set the density of the fluid to be 1000 kg/m^3. All the best Feng |
|
January 23, 2008, 20:07 |
Hi Feng!
Check the boundary
|
#7 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi Feng!
Check the boundary conditions for the mesh motion. If they are all Neumann and no Dirichlet the motion-solver has no fixed point and "shoots" the grid to infinity. 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 |
|
January 24, 2008, 18:10 |
Hi Bernhard!
Thanks for you
|
#8 |
Member
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 17 |
Hi Bernhard!
Thanks for your help! In fact, I have set the density of fluid to be 1 kg/m^3 for test, but the caculation still blows up. I am now trying your method, and have not worked it out. By the way, I am just wondering if I replace the original one with solidP[exchange[fI]]=rhoFluid.value()*fluidP[fI]; we all know OF also does the dimension checking, So after I make that change, the dimension on the right side of "=" will also change. The pressure tranfered to the solid structure will have the dimension of N/m^2, not m^2/s^2. I guess that might also be a problem All the best Feng |
|
January 25, 2008, 09:46 |
Hi Feng!
Dimensions are onl
|
#9 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi Feng!
Dimensions are only checked if you do the operations on the whole field. If you do it on a single-element level (like the example above) nothing will be checked (for performance reasons). In other words: you can be as unphysical as you like. Or: You have to ensure yourself, that what you do is correct. 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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error icoStructFoam | pi06jl6 | OpenFOAM Running, Solving & CFD | 1 | July 10, 2008 14:09 |
[OpenFOAM] Problems of postprocessing of icoStructFoam | fw407 | ParaView | 6 | May 30, 2008 18:09 |