Body force dependent on dynamic custom parameter

29 views
Skip to first unread message

Morten Bjerg

unread,
Sep 17, 2020, 9:23:59 AM9/17/20
to sailfish-cfd
Hello everyone

I would like to introduce a DynamicValue() body force that changes in space and time. I see that it is easy to do if my force depends on local position and time available through sym.S.gx and sym.S.time

But what if I would like it to depend on my own parameter sym.S.myValue which I update every timestep with after_step()? Is it even possible?

Help would be much appreciated!

/Morten

Marcin Kostur

unread,
Sep 17, 2020, 10:49:21 AM9/17/20
to sailfi...@googlegroups.com
Hi

It will probably be not that straightforward, body force currently is
a constant or it depends analytically on time and space.
Those symbolic parameters are used once for code generation, and are
not synchronized after.

On the other hand, you can experiment on a bit lower level:
- with --save_src and --use_src, modify manually device code:
- replace a force component for the device __global__ .
- Then in after step you write/read between the host and the
device: runner.module.get_global('a_parameter')[0] and
cuda.memcpy_htod.

the best
mk
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "sailfish-cfd" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sailfish-cfd...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sailfish-cfd/df3ca325-5d21-4b52-93e1-0839afeb6ed8n%40googlegroups.com.



--
Pełnomocnik Rektora
ds. zastosowania nowoczesnych komputerowych
metod kształcenia dla regionalnych
kadr innowacyjnej gospodarki
tel. +48 32 3497 612

http://icse.us.edu.pl
---------------------------

Morten Bjerg

unread,
Sep 18, 2020, 3:31:35 PM9/18/20
to sailfi...@googlegroups.com
Thank you for the quick response and suggestion, Marcin!

/Morten

You received this message because you are subscribed to a topic in the Google Groups "sailfish-cfd" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sailfish-cfd/WDlTIu9NyK0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sailfish-cfd...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sailfish-cfd/CAKcJhSL%2ByaWqxaKJUeEPMoNG1tt8TNwW8Ev22nxjdgNP%3Dq9OQQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages