How to conditionally pass a parameter to wordpress search to limit post types?

If you have a “natural” artwork archive (typically setting has_archive to true in your register_post_type() arguments), you already have the functionality in place:

http://example.com/artwork/?s=query

…assuming artwork is your archive slug, WordPress will search only artwork for “query”.

Just set the action attribute of the search form to the archive URL, like so:

<form action="<?php echo get_post_type_archive_link( 'artwork' ) ?>">