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

Can anybody give me advice

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By luckyluke

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 13, 2005, 05:13
Default I work on the solver 'interFoa
  #1
Member
 
Luckyluke
Join Date: Mar 2009
Posts: 51
Rep Power: 17
luckyluke is on a distinguished road
I work on the solver 'interFoam'.

I want to add a few codes in it to track the interface. Initial 'Gamma' field are defined using 'setGammaDamBreak'. I store the initial interface points with array.

In the code, the gamma, pd and U are updated using original VOF method. Then the interface points defined in the array are updated according to dx/dt=u,dy/dt=v, etc. The velocity u and v of the interface point is approximated using the value of the nearest cell.

Unfortunately, I can only achieve oscillating interface instead of smooth one. Why? What should be modified in my code?

Thank all.
Kummi likes this.
luckyluke is offline   Reply With Quote

Old   April 13, 2005, 12:08
Default Interpolate the U field onto y
  #2
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
Interpolate the U field onto your interface points instead of using the cell values.

Why do you want to track the interface with marker particles?
eugene is offline   Reply With Quote

Old   August 3, 2005, 09:06
Default Iīm checking in and out "geome
  #3
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17
rolando is on a distinguished road
Iīm checking in and out "geometricField"-objects in the object-registry on demand by using "regIOobject::checkIn()" and "regIOobject::checkOut()". That works fine.
Can anyone tell me if there is a method to check, whether a specific object is checked in or out?
As I see "regIOobject::registries()" doesnīt work as it just checks the ownership and not the status.
Rolando
rolando is offline   Reply With Quote

Old   August 4, 2005, 07:11
Default you could either add a const a
  #4
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
you could either add a const access function to the registered_ flag in regIOobject and recompile

or you can check the objectRegistry itself (access with db()) whether the object is registered:

objectRegistry::foundObject(...)

Why do you have to checkin/checkout manually?
mattijs is offline   Reply With Quote

Old   August 4, 2005, 08:23
Default Thanks Mattijs, as I donīt wa
  #5
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17
rolando is on a distinguished road
Thanks Mattijs,
as I donīt want to manipulate the Foam core functionality I chose the second suggestion.
The reason to checkIn/Out is: I do some averaging of the simulation results. Which fieldīs to average is runtime selectable to save both memory and disk space. Therefore I do manually checkIn/Out of the geometricFields.
Rolando
rolando is offline   Reply With Quote

Old   August 4, 2005, 09:28
Default This can be done more easily b
  #6
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
This can be done more easily by just reading name-lists of
scalar/vector/tensor fields of the variables you want to average and adding them to the main application.

Much similar to the problem being discussed in the 'pollutant dispersion...' thread.

...or have i missed something.

N
niklas is offline   Reply With Quote

Old   August 4, 2005, 09:49
Default Thanks Niklas, I think thatīs
  #7
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17
rolando is on a distinguished road
Thanks Niklas,
I think thatīs what Iīm actually doing.
I do a runtime lookup of the field names to average. I create the fields and store them in a table (not a list).
As the fields should also be destroyed when they are no longer used, I (think I) need to check them out before destoying them.
It seems to work.

Rolando
rolando is offline   Reply With Quote

Old   August 4, 2005, 09:54
Default The checkIn and checkOut are a
  #8
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
The checkIn and checkOut are automated, you shouldn't need to call these functions yourself.
When you destroy the field it should check itself out of the database however checking it out yourself should not cause any problems it's just unnecessary.
henry is offline   Reply With Quote

Old   August 4, 2005, 10:03
Default CheckingIn is done automated.
  #9
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17
rolando is on a distinguished road
CheckingIn is done automated. I do not have to call "checkIn()".
I store the fields in a "HashPtrTable". When I destroy them by calling "HashPtrTable::erase()" the field is not checked out of the database. At least calling "objectRegistry::names()" still displays the name of the field. If I call "checkOut()" before calling "HashPtrTable::erase()" the field name doesnīt appear any longer.
rolando is offline   Reply With Quote

Old   August 4, 2005, 10:12
Default It looks like you are creating
  #10
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
It looks like you are creating a copy which you are deleting but leaving the original in the database.
henry is offline   Reply With Quote

Old   August 4, 2005, 10:43
Default Thanks Henry Thatīs not good.
  #11
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17
rolando is on a distinguished road
Thanks Henry
Thatīs not good. I have to check this out.

Rolando
rolando is offline   Reply With Quote

Old   August 4, 2005, 12:20
Default As you said Henry. Now it work
  #12
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17
rolando is on a distinguished road
As you said Henry. Now it works fine.
Thanks
Rolando
rolando is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please give advice and help for the change the x y and z in U liugx212 OpenFOAM Running, Solving & CFD 5 December 19, 2005 23:45
Could someone please give advice? Frank Wedburn Main CFD Forum 11 September 26, 2005 14:31
please give me some advice. cfd lover Main CFD Forum 0 November 5, 2004 04:50
give me some advice about compressible LES. Bin Li Main CFD Forum 3 September 19, 2003 14:01
Could you give me your advice? Kim FLUENT 0 March 8, 2002 06:44


All times are GMT -4. The time now is 23:44.