Addition of a New boundry Condition
I want to introduce a new condition in the file which has the following link.
if you go to the file
you will see that it calculates the frequency value by the following formula
1.0 + amplitude_*
actually i want to introduce the angle theta as a phase angle into the above formula,
I am new into C++, could you guys give me tips how could i proceed it.
Thanks a lot.
If your theta is just a phase shift, simply add it inside the sin() function:
Just take a look at amplitude_ and copy it's behaviour, just changing the name of the variable to theta_ for example.
PS: To get the hang of C++, I recommend the book "The C++ Programming Language" by Bjarne Stroustrup. Or check out the great tutorial at http://www.cplusplus.com/doc/tutorial/
I did it the same way, as you have mentioned. after doing these changes. I wrote the "wmake libso" command in the directory of the finitevolume, and the compiler has created the .so file, and at last i also compiled the rhoTurbFoam file.
But when i used the rhoTurbFoam to solve my case, it created two more folders named 0.200 and 0.400 (according to the times).
In my 0.00 folder, i have added another term that is "angle" after frequency in the U file, but i didnt get the term "angle" in the U file in the folder 0.200.
there is no error, but on execution, the compiler, is not giving the output. I dont know whats the problem. May be I am doing a simple mistake that I cannot find it out.
Please help me out. Actually, this is my semester project and it is taking too much time now.
Thanks a lot for co-operation.
Sorry for bother you. Do you know how to correct my error?
My code is:
if (levelSet[gI] > 0.0002 )
H[gI] = 1;
if (levelSet[gI] < 0.0002 )
H[gI] = 0;
H[gI] = sin(levelSet[gI]);
And when I compile, I have this error in the line " H[gI] = sin(levelSet[gI]) " :
levelSetEqn.H:91: error: call of overloaded ‘sin(double&)’ is ambiguous
Thank you very much, Henrik
Now it works.
|All times are GMT -4. The time now is 23:19.|