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

try to creat Splash in PatchInteractionModel

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 10, 2014, 17:46
Post try to creat Splash in PatchInteractionModel
  #1
Member
 
bilal
Join Date: Mar 2014
Location: Germany
Posts: 30
Rep Power: 12
brbbhatti is on a distinguished road
I'm implementing Splash module as PatchInteractionModel. I am unable to understand the Correct function in every PatchInteractionModel implementation.Can anyone tell me from where Correct function is called and where I have to add my own functions besides Correct function

src / lagrangian / intermediate / submodels / Kinematic / PatchInteractionModel
brbbhatti is offline   Reply With Quote

Old   June 12, 2014, 09:54
Question Unknown Patch Interaction Model
  #2
Member
 
bilal
Join Date: Mar 2014
Location: Germany
Posts: 30
Rep Power: 12
brbbhatti is on a distinguished road
Hello everyone,

I am trying to implement a new model in Patch Interaction Model name Splash. I make a new correct function and make a new .C and .H file for splash. Then i add splash function in PatchInteraction model as they both are interconnected.

Then i add these files in Intermediate folder replacing the old Patch Interaction Model files and also make a new folder for splash Model.

I rename the Make file
Quote:
LIB = $(FOAM_USER_LIBBIN)/liblagrangianIntermediate_new
And then compile it by running

wclean
wmake libso


Then compile a new solver without any error.

But when i run it using the solver it give the following error :


Quote:
Constructing 3-D injection
Selecting distribution model uniform
Selecting patch interaction model splash


--> FOAM FATAL ERROR:
Unknown patch interaction model type splash

Valid patch interaction model types are:
5
(
localInteraction
multiInteraction
none
rebound
standardWallInteraction
)
From function PatchInteractionModel<CloudType>::New(const dictionary&, CloudType&) in file /home/bhb8fe/OpenFOAM/2.1.0/lib/lagrangian_new/intermediateSplash/lnInclude/PatchInteractionModelNew.C at line 54.
Can anyone tell me what can i do , where i have to add this splash Model so that the solver can call it.
brbbhatti is offline   Reply With Quote

Old   June 16, 2014, 10:13
Default
  #3
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19
dkxls will become famous soon enough
I wouldn't recompile the whole Lagrangian intermediate library only for a new sub-model.

I attached a small example that shows you how to implement your own patch interaction model in a user defined library.

Linking that library to a solver at compile or run-time is explained here (scroll down to the bottom of the page):
http://www.openfoam.org/docs/user/co...plications.php
Attached Files
File Type: gz MyPatchInteractionModel.tar.gz (4.1 KB, 51 views)
dkxls is offline   Reply With Quote

Old   June 16, 2014, 10:38
Default
  #4
Member
 
bilal
Join Date: Mar 2014
Location: Germany
Posts: 30
Rep Power: 12
brbbhatti is on a distinguished road
Hi Armin,

Thanks , i already read that link and i had a problem in calling the model when i try to run it. I compile the library and solver and that was ok but it was not recognizing the new model but now i got it that i have to mention it also in BasicKinematicParcelsubmodle.
but now i have some other problem because now it is not compiling the library.

I just have one question in

" How can i make changes in that or make new cloud type instead of correct

Quote:
template<class CloudType>bool Foam::PatchInteractionModel<CloudType>::correct
(
typename CloudType:arcelType&,
const polyPatch&,
bool&,
const scalar,
const tetIndices&
)
I tried to do some changes but it always says it is not the right <cloudtype>.

Can you just give me some hint or idea how can i make changes in that.

Regards,

Bilal
brbbhatti is offline   Reply With Quote

Old   July 1, 2014, 06:21
Default
  #5
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Bilal,

a very good and smooth way is
  • copy a existing and working model
  • rename the copied folder and files
  • rename the class and member names (as you wish)
  • change the necessary functions (like in ::correct)
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 1, 2014, 07:58
Default
  #6
Member
 
bilal
Join Date: Mar 2014
Location: Germany
Posts: 30
Rep Power: 12
brbbhatti is on a distinguished road
Hi Tobi,

Thanks for your time and reply.

I done that what you have written here. but porblem is that when i change the necessary functions like in :: correct i add some more functions which i needed it will not take them and give error like "not declared in scope, or Not a type".

So i make a new void-class-splash and its working now but when i want to use some equations from previous model then its says "shadow a vector" can you tell me how can i overcome this problem as my C++ is not strong.

Thanks.

Best regards,
Bilal
brbbhatti is offline   Reply With Quote

Old   July 1, 2014, 08:00
Default
  #7
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
In that case I can not give you any hint - sorry.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Reply

Tags
patchinteraction model, splash


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
[ICEM] How to creat surface from this geometry with icemcfd ztdep ANSYS Meshing & Geometry 2 April 26, 2013 12:01
[ANSYS Meshing] How to creat translational periodic mesh in three direcitons ChenZhan ANSYS Meshing & Geometry 5 January 23, 2013 07:51
how to creat a cone plane with ANSYS 14 CFD-Post L_W CFX 5 July 6, 2012 00:38
creat a pattern in DesignModler Jan CFX 2 June 12, 2005 00:38
Splash of Water Daniel Zetterberg Main CFD Forum 2 July 10, 2000 13:55


All times are GMT -4. The time now is 18:33.