how can use Cp and Cv in Swak variables?
in below function if I want to use Cp/Cv instead of constant gamma that Cp and Cv can be calculated by the solver how I could do it?
Code:
totalPressure_left |
Quote:
Otherwise there are functions that get these fields in the swakThermophysicalFunctions-plugin |
Hi Bernhard
thanks for guidance. I managed to do that in Swak postProcessing functions with the help of dear Bruno through your advice. now I want to use Cp and Cv in groovyBC variables but it dowsn't know Cp and Cv opposite to postProcessing functions. this is the error I get: Code:
[3] --> FOAM FATAL ERROR: Code:
loadThermo { in variables of groovyBC I wrote these terms in both patches for all variables(fields): Code:
"gamma2=Cp/Cv;" |
The problem is probably that the expressionField is created AFTER it is needed by groovyBC. This situation is ugly to work around.
Anyway. Before you proceed try removing Cp/Cv temporarily from the groovyBC/functions and use the listRegisteredObjects-functionObject to see if a fitting field is there. Maybe under a different name Quote:
|
Greetings to all!
@Bernhard: Ehsan forgot to update this thread. I had a look into this and answered him via email. The problem about "Cv" and "Cp" is that these fields are apparently also managed by some other class and they were unregistered at the end/beginning of the following time iteration. By renaming the field names to "CRRv" and "CRRp" in the function objects, it seemed to work just fine. I'll take the opportunity to consolidate the information I've been sending him over email. The following information was initially based on the example case "Examples/Lagrangian/hotStream" from swak4Foam:
Bruno |
Hi
whats the problem with reconstructPar about CRRv? Code:
Create time |
There are a few possibilities:
Quote:
Or you can do it directly from the command line: Code:
sed '4647!d' processor2/0.002216/CRRv Code:
sed '4646,4648!d' processor2/0.002216/CRRv |
Hi Bruno
but there is not CRRv,maybe its because of using ctrl+c. ehsan@Ehsan-com:~/Desktop/WR_4$ sed '4647!d' processor2/0.002216/CRRv sed: can't read processor2/0.002216/CRRv: No such file or directory |
Quote:
Let me see if I understand this correctly: instead of checking if the file actually existed or not and what contents it had, as the error message clearly stated that something was wrong with this file, you instead went here to the forum to ask something that only you could see on your computer... which is somewhat common... for beginners!!! You've been working with OpenFOAM for so long now, that these kinds of questions should no longer occur! Either way, why on Earth are you still using Ctrl+C? I sent you the other day via email the function object that helps to stop the solver, by simply creating a file named "stop". I'll remind you how it works:
|
Hi Bruno
sorry,I had to leave and hadn't enough time to use touch stop and also was confused with various jobs should be done.CRRv file was there in fact,I saw that at the moment but was empty or incomplete because it couldn't be unzip and also CRRp didn't exist there.now I deleted four time folders and used previous time folder by reconstructPar -latestTime and worked fine. I'm glad and it seems it made an opportunity for others to use the command you provided with my troubles and mentioned here. thanks a lot. |
Quote:
|
heat transfer simulation at walls
Hello I don't want to steal this thread but I think my Problem is quite similar to the problem of immortality. I hope this is okay.
I want to simulate a reactor. The upper part is heated from the outside and in the lower part where the flame is burning there should be like it is normal the heat transfer to the outside. I use of swak4Foam groovyBC to implement this heat transfer. If I try to run the simulation my error looks like this. Code:
/*---------------------------------------------------------------------------*\ I use OpenFoam 2.2.2 and the Version of swak4Foam which wyldcat posted (swak4Foam-master). I think this is the Version 0.2.4 but I am not sure. Thanks a lot for your time and help. Best regards Martin |
Quote:
Code:
aliases { |
Thanks a lot for your answer but now I have more questions.
How and where I can use the listRegisteredObjects-functionObject? I tried it in the terminal directly in the swak4Foam folder, but it want not work? Where I have to implement the aliases into the controlDict? Sorry for these question which maybe sounds to you trivial but I just started to use OpenFoam and therefore I am already not really familiar with some parts of it. Again thanks a lot for your time and help. Best regards Martin |
Quote:
Code:
grep -r listRegist Examples/* Quote:
Quote:
|
Thanks a lot for your help. You're right I am sorry for my questions in the future I will do more research before I ask something.
Thank you very much! Best regards Martin |
Dear Bernhard,
I have similar issue with the variable defined in meltingandsolidification source in OF 3.0 and ahead. details are given in post #1 Quote:
Also I have tried to list the variables using following commands Quote:
But I am pretty sure about the name of the variable as I can operate with the variable in coded functions (banana trick works in coded functions but not with type writeRegisteredObject; ) please help, some how the variable "sMS1:alpha1" access with swakExpressions seem very necessary to me. Thanks and regards. |
Quote:
(looking down I saw that the confusion comes from one of my answers. But I put the disclaimer below the answer for a reason. I'll edit the answer) |
Quote:
|
All times are GMT -4. The time now is 09:52. |