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

How to add the RhO to the icoStructFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 21, 2008, 01:34
Default you have not recognized progra
  #1
Member
 
Mojtaba Shahmohammadian
Join Date: Mar 2009
Posts: 73
Rep Power: 8
msha is on a distinguished road
you have not recognized programming in C++ using FOAM classes
msha is offline   Reply With Quote

Old   January 21, 2008, 06:28
Default Hi, Mojtaba Thanks for your
  #2
Member
 
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 8
fw407 is on a distinguished road
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
fw407 is offline   Reply With Quote

Old   January 21, 2008, 07:26
Default Dear Feng, I have written a
  #3
Senior Member
 
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 8
grtabor is on a distinguished road
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
grtabor is offline   Reply With Quote

Old   January 21, 2008, 13:40
Default Hi Feng! In the exchange li
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
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
gschaider is offline   Reply With Quote

Old   January 21, 2008, 20:19
Default Dear Gavin My email addres
  #5
Member
 
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 8
fw407 is on a distinguished road
Dear Gavin

My email address is feng.wang207@imperial.ac.uk

All the best

Feng
fw407 is offline   Reply With Quote

Old   January 21, 2008, 20:35
Default Hi, Bernhard, Now I can com
  #6
Member
 
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 8
fw407 is on a distinguished road
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
fw407 is offline   Reply With Quote

Old   January 23, 2008, 20:07
Default Hi Feng! Check the boundary
  #7
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
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
gschaider is offline   Reply With Quote

Old   January 24, 2008, 18:10
Default Hi Bernhard! Thanks for you
  #8
Member
 
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 8
fw407 is on a distinguished road
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
fw407 is offline   Reply With Quote

Old   January 25, 2008, 09:46
Default Hi Feng! Dimensions are onl
  #9
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
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
gschaider 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
Error icoStructFoam pi06jl6 OpenFOAM Running, Solving & CFD 1 July 10, 2008 13:09
Problems of postprocessing of icoStructFoam fw407 OpenFOAM Paraview & paraFoam 6 May 30, 2008 17:09


All times are GMT -4. The time now is 09:31.